diff --git a/src/language.yacc b/src/language.yacc index 4f1b8ab92a2caa90936cc1f985d9993926113a90..ebe908e88e359a38a8b8ad281986da3bbce52308 100644 --- a/src/language.yacc +++ b/src/language.yacc @@ -1375,14 +1375,16 @@ basic_type: identifier_type: idents { - fix_type_field($1); - - if (!pike_types_le($1->type, typeable_type_string) && - (THIS_COMPILATION->lex.pragmas & ID_STRICT_TYPES)) { - yytype_report(REPORT_WARNING, - $1->current_file, $1->line_number, typeable_type_string, - $1->current_file, $1->line_number, $1->type, - 0, "Invalid type."); + if ($1) { + fix_type_field($1); + + if (!pike_types_le($1->type, typeable_type_string) && + (THIS_COMPILATION->lex.pragmas & ID_STRICT_TYPES)) { + yytype_report(REPORT_WARNING, + $1->current_file, $1->line_number, typeable_type_string, + $1->current_file, $1->line_number, $1->type, + 0, "Invalid type."); + } } resolv_constant($1);