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 of overloaded methods and property expression argument(s) #892

Closed
eric-milles opened this issue May 20, 2019 · 0 comments
Assignees
Milestone

Comments

@eric-milles
Copy link
Member

Consider the following:

interface Face {
  setValue(String key, int val)
  setValue(String key, long val)
  setValue(String key, double val)
  setValue(String key, boolean val)
}

interface Keys {
  String ONE = 'one'
  String TWO = 'two'
}

void test(Face face) {
  face.with {
    setValue(Keys.ONE, false)
  }
}

Code hover (F2) should display "setValue(String,boolean)" for "setValue(Keys.ONE, false)".
Currently the first setter overload is chosen because the property expression is mapped to the type Object when choosing between overloads.

@eric-milles eric-milles self-assigned this May 20, 2019
@eric-milles eric-milles added this to the v3.4.0 milestone May 20, 2019
@eric-milles eric-milles changed the title Type inferencing of method call using property expression argument(s) Fix type inferencing of overloaded methods and property expression argument(s) May 20, 2019
eric-milles added a commit to thomsonreuters/groovy-eclipse that referenced this issue May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant