Created
May 12, 2016 06:49
-
-
Save buckle2000/fd74fd6a164ca2c895f87151c1d07568 to your computer and use it in GitHub Desktop.
The minimal project which will cause a bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package; | |
import openfl.display.Sprite; | |
class Main extends Sprite { | |
public function new () { | |
super (); | |
addChild(new NewClass()); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package; | |
import openfl.display.Shape; | |
import openfl.display.DisplayObjectContainer; | |
class NewClass extends DisplayObjectContainer { // the same bug will occur if you change parent class to `DisplayObject` | |
public function new() { | |
super(); // note that the contructor of `DisplayObjectContainer` is private, so does `DisplayObject` | |
var a = new Shape(); | |
addChild(a); | |
a.graphics.beginFill(0xff234567); | |
a.graphics.drawCircle(0, 0, 100); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment