2
0
Dan Korostelev 8 жил өмнө
parent
commit
9c99381611

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

@@ -0,0 +1,25 @@
+package unit.issues;
+
+// order of definition matters here, see https://github.com/HaxeFoundation/haxe/issues/6016
+
+private interface I<T> {
+	function f(v:T):Int;
+}
+
+private class C implements I<E> {
+	public function new() {}
+	public function f(v:E) return 42;
+}
+
+private enum E {
+	A;
+}
+
+class Issue6016 extends Test {
+	var c:I<E>;
+
+	function test(){
+		c = new C();
+		eq(c.f(A), 42);
+	}
+}