You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2026/10/20 01:28:01 UTC
[jira] [Closed] (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 ]
Paul King closed GROOVY-12091.
------------------------------
> 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)