Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field initializer anonymous inner class fouling up type inferencing / semantic highlighting #383

Closed
mauromol opened this issue Nov 10, 2017 · 2 comments
Assignees
Labels

Comments

@mauromol
Copy link

mauromol commented Nov 10, 2017

Follow-up to #378.
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()
		  }
		}
	  }
  }

m() call from the definition of whatever local variable is not underlined, but it's not actually recognized, as you can see with F2 or F3 on it, or by trying to rename m() to something else.

Please note that if you comment out the p field definition, then the second call to m() becomes recognized.

@eric-milles eric-milles changed the title Method not recognized and not underlined when invoked from an anonymous inner class and another anonymous inner class is assigned to a field of the same class Multiple anonymous inner classes of same type preventing type inferencing / semantic highlighting Nov 10, 2017
@eric-milles eric-milles changed the title Multiple anonymous inner classes of same type preventing type inferencing / semantic highlighting Field initializer anonymous inner class fouling up type inferencing / semantic highlighting Nov 11, 2017
@eric-milles
Copy link
Member

ready to test

@eric-milles eric-milles self-assigned this Nov 12, 2017
@mauromol
Copy link
Author

Hi Eric, I tested this with 2.9.2.xx-201711130408-e46 and it seems to be fixed, thank you! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants