Skip to content

Method not recognized when invoked from an anonymous inner class #378

@mauromol

Description

@mauromol

Consider the following Groovy class:

package test8
class A {
	protected def m() { }
	
	Object p = new Object() {
		String toString() {
			m()
		}
	}
	
	void init() {
		def whatever = new Object() {
		  def something() {
			m()
		  }
		}
	  }
  }

What I see is that m() call from the definition of A.p field (with an inner class) is underlined.
Instead m() call from the definition of whatever local variable is not underlined, by nevertheless it seems like the call is not recognized (F2 and F3 do not work).
Funny enough, if you comment out the p field definition, then the second call to m() becomes underlined :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions