Branch: Tag:

2021-04-14

2021-04-14 16:12:40 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Do not warn about invalid types in pass 1.

Fixes erroneous warnings due to casting to forward-referenced types.

1564:    if ($1) {    fix_type_field($1);    -  if (!pike_types_le($1->type, typeable_type_string, 0, 0) && +  if ((Pike_compiler->compiler_pass == COMPILER_PASS_LAST) && +  !pike_types_le($1->type, typeable_type_string, 0, 0) &&    (THIS_COMPILATION->lex.pragmas & ID_STRICT_TYPES)) {    yytype_report(REPORT_WARNING,    $1->current_file, $1->line_number, typeable_type_string,