[ https://issues.apache.org/jira/browse/GROOVY-11750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18017717#comment-18017717 ]
Renato Athaydes commented on GROOVY-11750: ------------------------------------------ I've tested this in Groovy 5.0 and confirmed it does work. But it does not work in Groovy 4.0.28 (latest 4.0.x as of writing), both tested using Java `24.0.2.fx-librca` from SDKMAN. > Cannot compile subclass of non-sealed class > ------------------------------------------- > > Key: GROOVY-11750 > URL: https://issues.apache.org/jira/browse/GROOVY-11750 > Project: Groovy > Issue Type: Bug > Affects Versions: 4.0.28 > Reporter: Renato Athaydes > Assignee: Eric Milles > Priority: Major > > With Groovy 4.0.28 and Java (FX) 24, the following code does not compile: > {code:java} > import javafx.scene.shape.Box; > /** > Class written in Java because currently Groovy compiler cannot generate > proper bytecode > for a child of a sealed class, as it seems. > */ > public abstract class TestSelectableNode extends Box { > } > {code} > It says it cannot extend a sealed class with a non-sealed class. > However, Box is non-sealed, so any sub-type of Box should be accepted. The > above class compiles if I put it in a .java file, just not in a .groovy file. -- This message was sent by Atlassian Jira (v8.20.10#820010)