Browse Source

[tests] also test 12435 with Int64

Rudy Ges 2 days ago
parent
commit
9a19f43ed6
1 changed files with 34 additions and 0 deletions
  1. 34 0
      tests/unit/src/unit/issues/Issue12435.hx

+ 34 - 0
tests/unit/src/unit/issues/Issue12435.hx

@@ -1,5 +1,7 @@
 package unit.issues;
 package unit.issues;
 
 
+import haxe.Int64;
+
 class Issue12435 extends Test {
 class Issue12435 extends Test {
 	function testCast() {
 	function testCast() {
 		var i:Int = cast null;
 		var i:Int = cast null;
@@ -32,4 +34,36 @@ class Issue12435 extends Test {
 		f(i == 0);
 		f(i == 0);
 		t(i == null);
 		t(i == null);
 	}
 	}
+
+	function testCast64() {
+		var i:Int64 = cast null;
+		#if static
+		#if !cppia // TODO
+		t(i == 0);
+		#end
+		t(i == cast null);
+		#else
+		f(i == 0);
+		t(i == null);
+		#end
+	}
+
+	function testPropagation64() {
+		var Null:Null<Int64> = null;
+		var i:Int64 = Null;
+		#if static
+		t(i == 0);
+		f(i == Null);
+		#else
+		f(i == 0);
+		t(i == null);
+		#end
+	}
+
+	function testPropagationNullable64() {
+		var Null:Null<Int64> = null;
+		var i:Null<Int64> = Null;
+		f(i == 0);
+		t(i == null);
+	}
 }
 }