2

Using freshly installed Eclipse:

Version: 2023-06 (4.28.0)
Build id: 20230608-1333

and

Eclipse Groovy Development Tools    5.0.0.v202306301519-e2306   

with Groovy Compiler Version set to 3.0.18

the code

if( methodNode.code !in BlockStatement ) return false

produces an Error marker: enter image description here

Needless to say, that the code compiles and runs just fine.

Am I missing something or is it a bug?

Created an issue

injecteer
  • 20,038
  • 4
  • 45
  • 89
  • Can SO actually help here? IDEs will always be prone to false positives and therefore you either have to suffer the IDE (e.g. disable this check) or make the code suffer for your IDE (rewrite the code to be warn-free). Or report a bug and sit it out. – cfrick Aug 28 '23 at 15:22
  • @cfrick hope to see this kind of interaction here https://stackoverflow.com/questions/61713375/trait-methods-are-not-fully-visible-in-groovy-eclipse ;) – injecteer Aug 28 '23 at 15:30

1 Answers1

1

As per comment in the issue, I added

-Dgroovy.antlr4=true

to the bottom of my eclipse.ini and it solved the problem

injecteer
  • 20,038
  • 4
  • 45
  • 89