Major fixes to types to make a distinction between
operations that are allowed for assignability and for casting. Casting
can allow sub-classes and super-classes to be changed, where as
assigning does not. There was also an issue that made Type == Type
always true for any instance types.
There are also fixes around when types can be converted between standard
numerics and chars.
A char can be returned as an int (char -> int). Any numeric can be
casted with a char.
Additional rules of casting numerics:
Only allow int <- int, not:
{byte,short} <- int
Only allow {short, int} <- short, not:
byte <- short
Disallow int[] <- byte[]. int <- byte is allowed though.
+14 tests
Also includes added tests a nameres fix that made method signature matching more strict, accounting for ~2-3 tests.
Major fixes to types to make a distinction between operations that are allowed for assignability and for casting. Casting can allow sub-classes and super-classes to be changed, where as assigning does not. There was also an issue that made Type == Type always true for any instance types.
There are also fixes around when types can be converted between standard numerics and chars.
A char can be returned as an int (char -> int). Any numeric can be casted with a char.
Additional rules of casting numerics: Only allow int <- int, not: {byte,short} <- int Only allow {short, int} <- short, not: byte <- short Disallow int[] <- byte[]. int <- byte is allowed though.
+14 tests Also includes added tests a nameres fix that made method signature matching more strict, accounting for ~2-3 tests.