Răsfoiți Sursa

add test (closes #3499)

Simon Krajewski 9 ani în urmă
părinte
comite
2ea3f3bd5f
1 a modificat fișierele cu 17 adăugiri și 0 ștergeri
  1. 17 0
      tests/unit/src/unit/issues/Issue3499.hx

+ 17 - 0
tests/unit/src/unit/issues/Issue3499.hx

@@ -0,0 +1,17 @@
+package unit.issues;
+
+#if js
+
+private typedef PathSimple = haxe.extern.EitherType<String,js.RegExp>;
+private typedef Path = haxe.extern.EitherType<PathSimple,Array<PathSimple>>;
+
+#end
+
+class Issue3499 extends Test {
+	#if js
+	function test() {
+		var a:Path = ["", new js.RegExp("")];
+		eq("", a[0]);
+	}
+	#end
+}