public sealed class Superclass permits Subclass { void foo() {} }