Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.0.21, 5.0.0-alpha-8, 4.0.21
-
None
Description
GROOVY-5705, GROOVY-5807, GROOVY-5881, GROOVY-6324, GROOVY-9418
Consider the following:
abstract class A { Closure func = { x -> x } } class C extends A { Closure proc = { -> } @CompileStatic test() { func(123) proc() } } print(new C().test())
STC is happy with "proc()" but errors on "func(123)". If a variable expression can be called without ".call" it should not matter the source of the variable. Both method call expressions work fine without STC.