sealed classes, records and enums

Sometimes we write something for the book, only to realize it shouldn’t be in the book. This post is an example. Do you think this legal?

public sealed interface MySealedClass permits MyRecord, MyEnum {

record MyRecord() implements MySealedClass {}

enum MyEnum implements MySealedClass { VALUE }

It is! A sealed interface can be implemented by any Java type. Which means records and enums are included.