-
-
Notifications
You must be signed in to change notification settings - Fork 689
Open
Description
The Int64 class is supported using two backing Ints, and when performing operators, it needs to access those two backing Ints. However, none of the operators do any form of null checking and this leads to crashes when Int64 is nullable. Int32 differs in this regard, since it ends up treating null as 0. Here's just one of many examples where this issue occurs:
final i:Int64 = 123;
final n:Int64 = null;
trace(i == n); // TypeError: can't access property "high", n is null
final i:Int32 = 123;
final n:Int32 = null;
trace(i == n); // falseI can't find any information about this behaviour, but I'm assuming this is a bug since the behaviour doesn't coincide with Int32 or Int and can lead to weird gotchas
Metadata
Metadata
Assignees
Labels
No labels