Skip to content

Fix type inferencing, syntax highlighting and code navigation for extension method that overloads declared method(s) #1335

@eric-milles

Description

@eric-milles

Follow up from #1076. The situation extends beyond Object methods. Consider the following:

def map = new HashMap()
map.equals([:]) // DefaultGroovyMethods#equals(Map,Map)
map.toString() // DefaultGroovyMethods#toString(AbstractMap)
println(map) // Script#println(Object) -- not DefaultGroovyMethods#println(Object)

The runtime selection for "equals", "toString" and "println" are indicated in the comments. Highlighting for "equals" and "toString" should indicate an extension method (purple not green).

image

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions