Referencing own constructor in inner function
问题 Here's a toy example distilled from a complex class: public class MyClass { public function MyClass() { trace('Created'); } public static function makeObjectAsync(callback:Function):void { inner(); function inner():void { var object:MyClass = new MyClass(); // line 10 callback(object); } } } After calling the static function: MyClass.makeObjectAsync(function(object:Myclass):void { ... }) the following run-time exception occurs at line 10: TypeError: Error #1007: Instantiation attempted on a