Skip to content

Fix type inferencing of overloaded methods and property expression argument(s) #892

@eric-milles

Description

@eric-milles

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions