Commit fcd98175 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

jscript: Implicitly turn CC on for @if instruction.

parent 8b363887
......@@ -1051,6 +1051,9 @@ static int cc_token(parser_ctx_t *ctx, void *lval)
}
if(!check_keyword(ctx, ifW, NULL)) {
if(!init_cc(ctx))
return -1;
if(!skip_spaces(ctx) || *ctx->ptr != '(')
return lex_error(ctx, JS_E_MISSING_LBRACKET);
......
......@@ -2185,6 +2185,12 @@ static BOOL run_tests(void)
parse_script_a("@set @t=2\nok(@t === 2, '@t = ' + @t);");
SET_EXPECT(global_success_d);
SET_EXPECT(global_success_i);
parse_script_a("@if(true)\nif(@_jscript) reportSuccess();\n@end");
CHECK_CALLED(global_success_d);
CHECK_CALLED(global_success_i);
run_from_res("lang.js");
run_from_res("api.js");
run_from_res("regexp.js");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment