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 2025/09/02 14:11:00 UTC

[jira] [Resolved] (GROOVY-11747) Groovy 5 Elvis operator VerifyError

     [ https://issues.apache.org/jira/browse/GROOVY-11747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Milles resolved GROOVY-11747.
----------------------------------
    Fix Version/s: 5.0.1
       Resolution: Fixed

https://github.com/apache/groovy/commit/ab9ceab69fbd167d56f55de5333a91110e95badc

> Groovy 5 Elvis operator VerifyError
> -----------------------------------
>
>                 Key: GROOVY-11747
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11747
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 5.0.0
>            Reporter: Juan Lopes
>            Priority: Major
>             Fix For: 5.0.1
>
>
> When upgrading from Groovy 4.0.28 to 5.0.0, I notice that compiling the following code started throwing VerifyError:
>  
> {code:java}
> static def test(long x, Long other) {return x ?: other}{code}
>  
> {{Observed exception:}}
>  
> {code:java}
> java.lang.VerifyError: Inconsistent stackmap frames at branch target 23
> Exception Details:
>   Location:
>     Script1.test(JLjava/lang/Long;)Ljava/lang/Object; @18: goto
>   Reason:
>     Current frame's stack size doesn't match stackmap.{code}
>  
>  
> Of course, that code does not make much sense, but a bad refactoring left it like that in my codebase, and after the version upgrade, it broke.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)