Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
2.0.5
-
None
-
None
-
Windows XP, groovy 2.0.5
Description
In the following code (and the same code is attached), two lines are printed out, which is what one should expect.
Alas, after uncommenting the @TypeChecked annotation, two (similar) errors are listed:
[Static type checking] - Cannot find matching method java.lang.Class#v(groovy.lang.Closure <java.lang.Void>). Please check if the declared type is right and if the method exists.
This is the code in question:
import groovy.transform.TypeChecked class A { static v = { it() } static main(args) { new A().m() } //@TypeChecked def m() { A.v() { println 'ok A.' } B.v() { println 'ok B.' } } } class B { static v = { it() } }