Skip to content

Instantly share code, notes, and snippets.

@Whiteknight
Created March 22, 2012 15:44
Show Gist options
  • Save Whiteknight/2159106 to your computer and use it in GitHub Desktop.
Save Whiteknight/2159106 to your computer and use it in GitHub Desktop.
Errors with winxed optional params
.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
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