Skip to content

Fix syntax highlighting for super method references (Groovy 4+) #1378

@eric-milles

Description

@eric-milles

Consider the following:

class C {
  private String field = 'field'
  private String method() { 'method' }
}
class D extends C {
  def m() {
    super.field // MissingPropertyException
    super.@field // MissingFieldException
    super.method() // MissingMethodException
    super.&method // returns MethodClosure that throws MissingMethodException when called
  }
}

Groovy 4 has improved handling of super. "method" should be shown as unknown (underlined) to indicate that it will not execute successfully.

https://issues.apache.org/jira/browse/GROOVY-9851
https://issues.apache.org/jira/browse/GROOVY-8999

image

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions