Christopher Smith created GROOVY-12545:
------------------------------------------

             Summary: 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: 6.0.0, 5.1.3
         Environment: JDK 25
            Reporter: Christopher Smith


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