Skip to content

No references found for members of Groovy class referenced within 'with' closure #788

@mauromol

Description

@mauromol

Follow up of #364.

Consider this Groovy class:

package test45

class Test45 {
  static class Foo {
	  String someString = 'foo'
  }
  
  static class Bar {
	  String someString = 'bar'
	  Foo foo = new Foo()
	  
	  void doSomething() {
		  foo.with {
			  println "someString inside with closure = $someString"
			  println "someString of owner inside with closure = $owner.someString"
			  owner.someString
			  someString
|		  }
	  }
  }
  
  static main(args) {
	  Bar b = new Bar()
	  println "b.someString = $b.someString"
	  println "b.foo.someString = $b.foo.someString"
	  b.doSomething()
  }
}

Try to invoke Call Hierarchy or Search for References for either Foo.someString or Bar.someString: no references at all is found for either of them.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions