浏览代码

added unit test for #6703

Nicolas Cannasse 7 年之前
父节点
当前提交
2d5a27fe47
共有 1 个文件被更改,包括 25 次插入0 次删除
  1. 25 0
      tests/unit/src/unit/issues/Issue6703.hx

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