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 2026/06/17 19:03:00 UTC
[jira] [Updated] (GROOVY-12091) Regression in Groovy 5: bounded generic trait property setter remains abstract in implementing class
[ https://issues.apache.org/jira/browse/GROOVY-12091?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles updated GROOVY-12091:
---------------------------------
Fix Version/s: 5.0.7
> Regression in Groovy 5: bounded generic trait property setter remains abstract in implementing class
> ----------------------------------------------------------------------------------------------------
>
> Key: GROOVY-12091
> URL: https://issues.apache.org/jira/browse/GROOVY-12091
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 5.0.6
> Reporter: Mattias Reichel
> Assignee: Eric Milles
> Priority: Major
> Fix For: 6.0.0-alpha-2, 5.0.7
>
>
>
> This example compiles with Groovy 4
> {code:java}
> trait FooTrait<F extends Serializable> {
> F foo
> }
> class Bar implements Serializable, FooTrait<Bar> {
> String name
> }
> {code}
> but results in
>
> {code:java}
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
> ideaGroovyConsole.groovy: 5: Can't have an abstract method in a non-abstract class. The class 'Bar' must be declared abstract or the method 'F FooTrait__foo$set(F)' must be implemented.
> @ line 5, column 1.
> class Bar implements Serializable, FooTrait<Bar> {
> ^
> 1 error
> {code}
> with Groovy 5.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)