What is the maximum number of sub classes that can be listed for a sealed class (analogous for interfaces):
public sealed class Foo permits A, B, C {
// How many sub classes can ^^^^^^^
// be listed here?
}
Does the language actually define a limit; i.e., is it virtually infinite at the level of the language?
If there is no such limit at the level of the language, it seems that an implementation still must have a technical limit. Somewhere there ought to be a list that stores some kind of representation of the sub classes permitted. I would expect a 16 or 32 bit integer to be used then.