2
0
Эх сурвалжийг харах

make haxe.Int64 non-nullable on flash too (closes #3894)

Simon Krajewski 10 жил өмнө
parent
commit
aeba3da4bc

+ 3 - 0
std/haxe/Int64.hx

@@ -27,6 +27,9 @@ using haxe.Int64;
 	A cross-platform signed 64-bit integer.
 	Int64 instances can be created from two 32-bit words using `Int64.make()`.
  **/
+#if flash
+@:notNull
+#end
 abstract Int64(__Int64) from __Int64 to __Int64
 {
 	private inline function new( x : __Int64 )

+ 10 - 0
tests/unit/src/unit/issues/Issue3894.hx

@@ -0,0 +1,10 @@
+package unit.issues;
+
+class Issue3894 extends Test {
+	function test() {
+		#if (flash || cs || java || cpp)
+		// this doesn't actually error until post-processing so we cannot test it like this
+		//t(unit.TestType.typeError((null : haxe.Int64)));
+		#end
+	}
+}