Ver Fonte

[php] test case dynamic method and empty constructor (closes #4723)

Alexander Kuzmenko há 8 anos atrás
pai
commit
3e7e7c766b
1 ficheiros alterados com 25 adições e 0 exclusões
  1. 25 0
      tests/unit/src/unit/issues/Issue4723.hx

+ 25 - 0
tests/unit/src/unit/issues/Issue4723.hx

@@ -0,0 +1,25 @@
+package unit.issues;
+
+import haxe.Json;
+
+class Issue4723 extends unit.Test {
+	function test() {
+		var t = new NoNormalMethods();
+		eq(10, t.test());
+
+		var t = new HasNormalMethod();
+		eq(10, t.test());
+		eq(20, t.test2());
+	}
+}
+
+private class NoNormalMethods {
+	public function new() {}
+	public dynamic function test() return 10;
+}
+
+private class HasNormalMethod {
+	public function new() {}
+	public dynamic function test() return 10;
+	public function test2() return 20;
+}