Generic types in permits clause of a sealed class
Gavin Bierman
gavin.bierman at oracle.com
Thu Jun 18 10:40:05 UTC 2020
Correct - the permits clause should contain a list of type names, not types.
I’ll look into it.
Gavin
> On 18 Jun 2020, at 11:18, Anna Kozlova <anna.kozlova at jetbrains.com> wrote:
>
> Hi,
>
> it looks like that generic type argument in the following code makes not
> much sense, should not the compiler reject it?
>
> public sealed interface IC permits ID<String> {}
> non-sealed interface ID<T> extends IC {}
>
> Thanks,
>
> Anna
More information about the amber-dev
mailing list