2
0
Nicolas Cannasse 7 жил өмнө
parent
commit
2d5a27fe47

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

@@ -0,0 +1,25 @@
+package unit.issues;
+import unit.Test;
+
+private interface A {
+	function foo() : Float;
+}
+
+class Issue6703 extends Test implements A {
+
+	var v : Float;
+
+	public function foo() : Float {
+		return v;
+	}
+
+	static function getClosure( inst : A ) {
+		return inst.foo;
+	}
+	
+	function test() {
+		v = 123.45;
+		eq( getClosure(this)(), 123.45 );
+	}
+	
+}