Browse Source

add unit test for issue #5248

Justin Donaldson 9 years ago
parent
commit
31403873a3
1 changed files with 23 additions and 0 deletions
  1. 23 0
      tests/unit/src/unit/issues/Issue5248.hx

+ 23 - 0
tests/unit/src/unit/issues/Issue5248.hx

@@ -0,0 +1,23 @@
+package unit.issues;
+class Issue5248 extends Test{
+	function test(){
+		var f1 = new Issue5248Foo();
+		eq(f1.saved, "123");
+	}
+}
+
+class Issue5248Foo {
+    var processData:Array<Int>->Array<Int>;
+    public var saved : String; 
+
+
+    public function new():Void {
+        var arr = [1,2,3];
+        this.processData = _processData;
+        saved = processData(arr).join("");
+    }
+
+    function _processData(arr:Array<Int>):Array<Int> {
+        return arr;
+    }
+}