pike.git
/
src
/
docode.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/docode.c:2302:
INT32 label = ins_label(-1); int i; for (i = 0; i < 2; i++) { node *case_val = i == 0 ? CAR(n) : CDR(n); if (case_val) { if(!is_const(case_val)) yyerror("Case label isn't constant.");
-
if (case_val->type
&& !TEST_COMPAT(0,6
)
)
{
+
if (case_val->type) {
if (!pike_types_le(case_val->type, current_switch.type)) { if (!match_types(case_val->type, current_switch.type)) { yytype_error("Type mismatch in case.", current_switch.type, case_val->type, 0); } else if (c->lex.pragmas & ID_STRICT_TYPES) { yytype_error("Type mismatch in case.", current_switch.type, case_val->type, YYTE_IS_WARNING); } } }