Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Consider the following:
@groovy.transform.CompileStatic void test() { def c = { p, q = p.toString() -> '' + p + q } assert c('foo', 'bar') == 'foobar' assert c('foo') == 'foofoo' } test()
Default argument creates delegate method that does not have static compilation. Running script throws java.lang.IncompatibleClassChangeError.
Attachments
Issue Links
- is related to
-
GROOVY-10072 SC: closure with default argument(s)
-
- Closed
-
-
GROOVY-11001 AIOOBE when using method reference in nested lambda
-
- Closed
-
- relates to
-
GROOVY-11030 CompileStatic: string concatenation in method parameter default value results in NoSuchMethodError
-
- Closed
-