Branch: Tag:

2021-12-03

2021-12-03 09:44:13 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: More find_lfun_type() fixes.

3772:   static struct pike_type *find_lfun_type(struct pike_type *t, int lfun)   {    struct pike_type *ret = NULL; +  struct pike_type *tmp;    struct svalue *s;       if (!t) return NULL;
3819:       case T_OR:    case T_AND: +  ret = find_lfun_type(t->car, lfun); +  tmp = find_lfun_type(t->cdr, lfun); +  if (!ret) { +  if (!tmp) return NULL; +  if (t->type == T_AND) { +  free_type(tmp); +  } else { +  ret = tmp; +  } +  } else if (tmp) {    type_stack_mark(); -  push_finished_type(ret = find_lfun_type(t->car, lfun)); +  push_finished_type(ret);    free_type(ret); -  push_finished_type(ret = find_lfun_type(t->cdr, lfun)); -  free_type(ret); +  push_finished_type(tmp); +  free_type(tmp);    push_type(t->type);    return pop_unfinished_type(); -  +  } +  return ret;       case T_MIXED:    case T_ZERO: