Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.3.3
-
None
Description
interface X { def m() } @groovy.transform.CompileStatic class A { Object pm = "pm" def bar(Closure<? exends X> x) {x().m()} def foo() { bar { -> return new X() { def m() { print pm.getClass().getSimpleName() } } } } }
This fails with
Cannot call A$1#<init>(groovy.lang.Closure) with arguments [A]
and
Cannot find matching method A#bar(groovy.lang.Closure <A$1>). Please check if the declared type is right and if the method exists.
but it should work