Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type inferencing and code navigation for Object vs Object[] method overloads #1160

Closed
eric-milles opened this issue Sep 17, 2020 · 1 comment
Assignees
Labels
Milestone

Comments

@eric-milles
Copy link
Member

Consider the following:

import static C.m

abstract class A {
}

class C {
  static m(Object one) {}
  static m(Object[] zeroOrMore) {}
}

m()
m(null)
m(null, null)
m(new A() {})

The last method call is show as a reference to the "zero-or-more" overload when the type class of the argument is unavailable (unbuilt project). The first overload should make a better match and be the one selected.

image

@eric-milles
Copy link
Member Author

image

The operating assumption is that the Object[] overload is declared after the other.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant