Browse Source

added test for #4419

Andy Li 10 years ago
parent
commit
523d5a1391

+ 23 - 0
tests/unit/src/unit/issues/Issue4419.hx

@@ -0,0 +1,23 @@
+package unit.issues;
+
+#if js
+@:native("Issue4419External")
+private extern class External {
+    static function __init__():Void {
+        haxe.macro.Compiler.includeFile("unit/issues/misc/Issue4419External.js");
+    }
+}
+
+private class SubExt extends External {
+	public function new():Void {}
+	public function hello() return "hello";
+}
+#end
+
+class Issue4419 extends Test {
+	#if js
+	function test() {
+		eq("hello", new SubExt().hello());
+	}
+	#end
+}

+ 1 - 0
tests/unit/src/unit/issues/misc/Issue4419External.js

@@ -0,0 +1 @@
+var Issue4419External = function() { };