Branch: Tag:

2021-03-29

2021-03-29 13:35:38 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix warning about overloading classes with create().

Do not check the types for overloaded constants before the last pass.

3144:       /* Check if the symbol was used before it was inherited. */    if ((c->lex.pragmas & ID_STRICT_TYPES) && +  (Pike_compiler->compiler_pass == COMPILER_PASS_LAST) &&    (sub_ref->id_flags & ID_USED)) {    struct identifier *sub_id = ID_FROM_PTR(inh->prog, sub_ref);    if (IDENTIFIER_IS_FUNCTION(sub_id->identifier_flags)) { -  if ((Pike_compiler->compiler_pass == COMPILER_PASS_LAST) && -  !pike_types_le(ID_FROM_PTR(Pike_compiler->new_program, +  if (!pike_types_le(ID_FROM_PTR(Pike_compiler->new_program,    new_ref)->type, sub_id->type, 0, 0)) {    yytype_report(REPORT_WARNING,    NULL, 0, sub_id->type,