|
|
|
|
|
by tsimionescu
1992 days ago
|
|
This soundness hole (or a very similar one) was also accepted in Java itself (with subtypes rather than sum types). The main reason behind accepting it is that it is very useful and safe in certain situations that the type system is too weak to define strictly: if a function takes an (string|number)[] and only reads from it, it is perfectly safe to pass in a string[]. |
|