[
https://issues.apache.org/jira/browse/GROOVY-10305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles updated GROOVY-10305:
---------------------------------
Priority: Critical (was: Major)
> Groovy records do not allow creating non-compact constructors with signature
> matching the record one
> ----------------------------------------------------------------------------------------------------
>
> Key: GROOVY-10305
> URL: https://issues.apache.org/jira/browse/GROOVY-10305
> Project: Groovy
> Issue Type: Bug
> Components: Compiler
> Affects Versions: 4.0.0-beta-1
> Reporter: Konstantin Nisht
> Priority: Critical
> Labels: ClassFormatError
>
> The following code
> {code:java}
> record X(int a) {
> public X(int a) {
> println "abcd"
> }
> }
> def x = new X(10){code}
>
> fails to run with an exception "java.lang.ClassFormatError: Duplicate method
> name "<init>" with signature "(I)V" in class file X". Similar code in java
> works fine.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)