Browse Source

[cs] add test (closes #6016)

Dan Korostelev 8 years ago
parent
commit
9c99381611
1 changed files with 25 additions and 0 deletions
  1. 25 0
      tests/unit/src/unit/issues/Issue6016.hx

+ 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);
+	}
+}