Created
October 7, 2012 10:45
-
-
Save skial/3847840 to your computer and use it in GitHub Desktop.
@:overload and @:macro via andy li google groups haxe mailing list
This file contains hidden or 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
| // https://groups.google.com/d/msg/haxelang/IAqSXSREyHA/hjq-ZcLAcr4J | |
| @:overload(function(a:Dynamic,b:Dynamic):Void{}) | |
| @:overload(function<A,B,C>(a:A, b:B, c:C):C{}) | |
| @:macro public static function foo(args:Array<Expr>):Expr { | |
| return switch (args.length) { | |
| case 2: args[0]; | |
| case 3: args[2]; | |
| default: throw "wrong args"; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment