Skip to content

Fix type inferencing and syntax highlighting for static owner and delegate of closure #1583

@eric-milles

Description

@eric-milles

Consider the following:

class Foo {
  static getBar() { 'bar' }
  Object getBaz() { 'baz' }
}

Foo.with {
  bar
  baz
  getBar()
  getBaz()
}

def cls = String
def num = cls.valueOf(123)
num = cls.with { valueOf(456) }

"bar" and "getBar" should be highlighted as a static method reference. "baz" and "getBaz" are correctly indicagted as unknown (underlined). Similarly "valueOf" within the closure should resolve to String#valueOf.

image

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions