permit with a class which is not a subtype is allowed
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Tue Sep 3 13:19:33 UTC 2019
I think there might be a range of options here - error is one, lint
warning (e.g. redundant permits) is another.
But, nevertheless you raise a valid point.
Maurizio
On 03/09/2019 14:03, Remi Forax wrote:
> The compiler allows to permit a class which is not a subtype.
>
> public class AncestorPermitExample {
> sealed interface I permits A {
>
> }
> final static class A {
>
> }
> }
>
> The VM too but it's not a bug for the VM (i believe).
>
> Rémi
More information about the amber-dev
mailing list