2 ms·
You can kind of solve this by making the constructor of the outer class private and defining all subtypes as nested types. It's not ideal, but it works.
by contravariant 8y ago
You can kind of solve this by making the constructor of the outer class private and defining all subtypes as nested types.
It's not ideal, but it works.