Eric Milles created GROOVY-11860:
------------------------------------
Summary: apply @Final transform to constructor produces class
format error
Key: GROOVY-11860
URL: https://issues.apache.org/jira/browse/GROOVY-11860
Project: Groovy
Issue Type: Bug
Reporter: Eric Milles
Consider the following:
{code:groovy}
class C {
@groovy.transform.Final
C() {
}
}
{code}
After compilation, loading this class results in:
{code}
java.lang.ClassFormatError: Method <init> in class C has illegal modifiers: 0x11
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1027)
{code}
The compiler should omit an error or ignore the invalid request for final on
constructor.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)