Created
March 22, 2012 15:44
-
-
Save Whiteknight/2159106 to your computer and use it in GitHub Desktop.
Errors with winxed optional params
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
.sub 'whatever' :subid('WSubId_2') | |
.param string __ARG_1 :optional | |
.param int __opt_flag__ARG_1 :opt_flag | |
if __opt_flag__ARG_1 goto __label_1 | |
.annotate 'line', 10 | |
$P1 = WSubId_1() | |
set __ARG_1, $P1 | |
__label_1: | |
.const 'Sub' WSubId_1 = "WSubId_1" | |
.annotate 'line', 12 | |
concat $S1, "In whatever: ", __ARG_1 | |
say $S1 | |
.annotate 'line', 13 | |
.end # whatever |
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
function foo(var x = self.method()) | |
- self is null | |
function foo(int x = false) | |
- ugly error about unexpanded constant | |
const int CONST_BAR = 4; | |
function foo(int x = CONST_BAR) | |
- ugly error about unexpanded constant | |
namespace Bar { function baz() { } } | |
function foo(var x = Bar.baz()) | |
- Attempt to call method on something that isn't an object |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment