[
https://issues.apache.org/jira/browse/GROOVY-11750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18017706#comment-18017706
]
Eric Milles commented on GROOVY-11750:
--------------------------------------
GROOVY-11292 seems to be the same issue. I can take a quick look at the
feasibility of backport. It may be due to using newer JDK APIs.
> 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
> 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)