Skip to content

improve dispatch for proc-to-iface based on arg count #3136

@kares

Description

@kares

currently in edge cases when there's an ambiguous match e.g.

java.io.File.new('.').listFiles { ... } (2 method exists that accept a single function-interface argument)

no matter the passed Proc's arity the FileFilter#accept(File) seems to be used (with a warning being printed) while with { |arg1, arg2| } we can assume that FilenameFilter#accept(File, String) is more desired than the FileFilter#accept(File)

UPDATE: which method will be used will currently depend on env (returned method order)!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions