Generic types in permits clause of a sealed class

Anna Kozlova anna.kozlova at jetbrains.com
Thu Jun 18 10:18:52 UTC 2020


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