Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.6
-
None
Description
class FailsVerification { static class Nested { @groovy.transform.CompileStatic static method() { def closure = {-> println 'foo' } closure() } } public static void main(String[] args) { Nested.method() } }
If we call the closure through call() it works:
class Works{ static class Nested { @groovy.transform.CompileStatic static method() { def closure = {-> println 'foo' } closure.call() } } public static void main(String[] args) { Nested.method() } }