@@ -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 @@
-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
@@ -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