[
https://issues.apache.org/jira/browse/GROOVY-11750?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Renato Athaydes updated GROOVY-11750:
-------------------------------------
Description:
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.
was:
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 implements
SelectionHandler.SelectableNode {
}
{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.
> Cannot compile subclass of non-sealed class
> -------------------------------------------
>
> Key: GROOVY-11750
> URL: https://issues.apache.org/jira/browse/GROOVY-11750
> Project: Groovy
> Issue Type: Bug
> 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)