Skip to content

Quick Assist "Replace method call with property expression" inserts qualifier to maintain semantics of property #1288

@eric-milles

Description

@eric-milles

Consider the following:

class C {
  def  getX() { 'C' }
  void test() {
    [x:'map'].with {
      print getX()
    }
  }
}

"getX()" is declared by class C, not Map is this case (see #1277).

image

When invoking "Replace method call with property expression" quick fix (Ctrl+Shift+,) the call is replaced by "x" which resolves to the map delegate. A qualifier is required to maintain the reference to the method declared by C.

image

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions