You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2023/04/24 14:28:00 UTC
[jira] [Updated] (GROOVY-11023) SC: fix IncompatibleClassChangeError when closure direct targets extension method
[ https://issues.apache.org/jira/browse/GROOVY-11023?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles updated GROOVY-11023:
---------------------------------
Component/s: Static compilation
> SC: fix IncompatibleClassChangeError when closure direct targets extension method
> ---------------------------------------------------------------------------------
>
> Key: GROOVY-11023
> URL: https://issues.apache.org/jira/browse/GROOVY-11023
> Project: Groovy
> Issue Type: Bug
> Components: Static compilation
> Reporter: Eric Milles
> Assignee: Eric Milles
> Priority: Major
>
> Consider the following:
> {code:groovy}
> @groovy.transform.CompileStatic
> void test() {
> def c = { p, q = p.toString() -> '' + p + q }
> assert c('foo', 'bar') == 'foobar'
> assert c('foo') == 'foofoo'
> }
> test()
> {code}
> Default argument creates delegate method that does not have static compilation. Running script throws {{java.lang.IncompatibleClassChangeError}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)