From: Matthias Kramm Date: Fri, 30 Jan 2009 19:27:49 +0000 (+0100) Subject: fixed 'precedence' test case X-Git-Tag: release-0-9-0~194 X-Git-Url: http://git.asbjorn.biz/?a=commitdiff_plain;ds=sidebyside;h=15e8636a35f6ce15f3753e3363ba0956499b3b25;p=swftools.git fixed 'precedence' test case --- diff --git a/lib/as3/parser.y b/lib/as3/parser.y index 70d2be2..ffc9960 100644 --- a/lib/as3/parser.y +++ b/lib/as3/parser.y @@ -950,6 +950,7 @@ static void startfunction(token_t*ns, int flags, enum yytokentype getset, char*n name = "__as3_constructor__"; if(as3_pass == 1) { + return_type = 0; state->method->info = registerfunction(getset, flags, name, params, return_type, 0); } @@ -958,6 +959,7 @@ static void startfunction(token_t*ns, int flags, enum yytokentype getset, char*n TODO: better getter/setter support? */ if(!state->cls) state->method->info = registry_findclass(state->package, name)->function; else state->method->info = registry_findmember(state->cls->info, name, 0); + state->method->info->return_type = return_type; global->variable_count = 0; /* state->vars is initialized by state_new */ @@ -2650,7 +2652,7 @@ E : '-' E { E : E '[' E ']' { $$.c = $1.c; $$.c = code_append($$.c, $3.c); - + MULTINAME_LATE(m, $1.t?$1.t->access:ACCESS_PACKAGE, ""); $$.c = abc_getproperty2($$.c, &m); $$.t = 0; // array elements have unknown type