Skip to content

Incorrect method precedence with overloading and variable arity #221

@tpoliaw

Description

@tpoliaw

If a Java class has overloaded methods such as

public class Demo {
    public void foo(int a, int b) {
        System.out.println("two ints");
    }
    public void foo(int... args) {
        System.out.println("vararg ints");
    }
}

Calling demo.foo(1, 2) from Java code gives two ints as expected but from jython code gives vararg ints. The same can be seen with constructors now that vararg constructors are supported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions