Browse Source

[tests] adjust

Simon Krajewski 7 years ago
parent
commit
1f8f2b15db

+ 3 - 3
tests/misc/projects/Issue6030/Main1.hx

@@ -1,10 +1,10 @@
 class Main1 {
     public var ok(default,null):Void->Void;
-    public var stillOk(default,never) = function(){return function(){trace("This works.");};}();
-    public var notOk(default,never) = function(){return function(){trace("This does not work. "+this);};}();
+    public var stillOk(default,never) = (function(){return function(){trace("This works.");};})();
+    public var notOk(default,never) = (function(){return function(){trace("This does not work. "+this);};})();
 
     public function new(){
-        ok = function(){return function(){trace("This works. "+this);};}();
+        ok = (function(){return function(){trace("This works. "+this);};})();
     }
 
     static function main() {

+ 1 - 1
tests/misc/projects/Issue6030/compile-fail.hxml.stderr

@@ -1 +1 @@
-Main1.hx:4: characters 97-101 : Cannot access this or other member field in variable initialization
+Main1.hx:4: characters 98-102 : Cannot access this or other member field in variable initialization

+ 1 - 1
tests/unit/src/unit/TestType.hx

@@ -179,7 +179,7 @@ class TestType extends Test {
 		typedAs([ { x : new Child1() }, { x : new Child2() } ], [{ x: new Base() }]);
 
 		#if flash
-		typedAs(function() { return 0; var v:UInt = 0; return v; } (), 1);
+		typedAs((function() { return 0; var v:UInt = 0; return v; }) (), 1);
 		#end
 	}