-
-
Save bsideup/adcf66c2741759ababe1 to your computer and use it in GitHub Desktop.
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 flash.display.*; | |
public class Main extends Sprite implements MyTrait | |
{ | |
public function Main() | |
{ | |
addChild(this.q3()); | |
} | |
} | |
} |
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 flash.display.Bitmap; | |
import flash.display.BitmapData; | |
import flash.display.DisplayObject; | |
[Trait] | |
public interface MyTrait | |
{ | |
function q1(s : String, i : int, complexType : Bitmap) : void | |
{ | |
trace("q1"); | |
} | |
function q2(s : String) : void | |
{ | |
throw new Error("q2!!!"); | |
} | |
function q3 () : DisplayObject | |
{ | |
return new Bitmap(new BitmapData(100, 100, false, 0xFF0000)); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment