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

Christopher Smith updated GROOVY-12545:
---------------------------------------
    Attachment: mcve01_static_implicit_class_receiver.groovy

> STC: implicit Class receiver in static method compiled as aload_0 
> (VerifyError)
> -------------------------------------------------------------------------------
>
>                 Key: GROOVY-12545
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12545
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler, Static compilation
>    Affects Versions: 5.1.3, 6.0.0
>         Environment: JDK 25
>            Reporter: Christopher Smith
>            Priority: Major
>         Attachments: mcve01_static_implicit_class_receiver.groovy
>
>
> In a {{@CompileStatic}} static method, an unqualified instance-method call 
> ({{getSimpleName()}}) targets the declaring {{Class}}.
>   - 4.0.33 emits {{ldc Foo; invokevirtual Class.getSimpleName}}.
>   - 5.1.3 and 6.0.0 emit {{aload_0}}, which is invalid in a static method, 
> and the JVM throws {{VerifyError: Bad local variable type}} when the class 
> loads.
> This appears to have become broken in 5.0.0-alpha-11.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to