浏览代码

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

Simon Krajewski 10 年之前
父节点
当前提交
aeba3da4bc
共有 2 个文件被更改,包括 13 次插入0 次删除
  1. 3 0
      std/haxe/Int64.hx
  2. 10 0
      tests/unit/src/unit/issues/Issue3894.hx

+ 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
+	}
+}