Created
September 2, 2011 17:08
-
-
Save alexnask/1189179 to your computer and use it in GitHub Desktop.
Possible fix
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
| // We eliminate any generic variable that is passed as a "true" function argument | |
| // E.g. in __va_call: inline func <T> (f: Func <T> (T), T: Class, arg: T) | |
| typeArgs := fDecl typeArgs filter(|arg| !fDecl args contains?(arg)) | |
| /* Step 3 : write generic type args */ | |
| for(typeArg in typeArgs) { | |
| if(isFirst) isFirst = false | |
| else hw app(", ") | |
| hw app(typeArg getName()) | |
| } | |
| /* Step 4 : write real args */ | |
| for(arg in fDecl args) { | |
| if(isFirst) isFirst = false | |
| else hw app(", ") | |
| if(arg instanceOf?(VarArg)) hw app("...") | |
| else hw app(arg getName()) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment