Branch: Tag:

2022-06-27

2022-06-27 12:39:13 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Support casting to attributed types.

Also: Avoid complaining about assigning deprecated values
to deprecated variables.

4934:    free_type(tmp);    return pop_unfinished_type();    case PIKE_T_ATTRIBUTE: +  if (b && (b->type == PIKE_T_ATTRIBUTE) && (b->car == a->car)) { +  /* Types a and b have the same attribute. +  * +  * Do NOT call pop_type_attribute() (or push_type_attribute()) +  * in this case. +  */ +  tmp = low_type_binop(op, a->cdr, b->cdr, remap, +  aflags, bflags, remap_flags); +  if (!tmp) { +  return NULL; +  } +  } else {    tmp = low_type_binop(op, a->cdr, b, remap, aflags, bflags, remap_flags); -  +     if (!tmp) {    if (c && (op == PT_BINOP_MINUS)) {    ref_push_string((struct pike_string *)a->car);
4953:    }    return NULL;    } +  }       type_stack_mark();    push_finished_type(tmp); - #if 0 +  if (op == PT_BINOP_AND) {    push_type_attribute((struct pike_string *)(a->car)); - #endif +  }    free_type(tmp); -  +     return pop_unfinished_type();    case T_SCOPE:    tmp = low_type_binop(op, a->cdr, b, remap,
5005:       type_stack_mark();    push_finished_type(tmp); - #if 0 +  if (op == PT_BINOP_AND) {    push_type_attribute((struct pike_string *)(b->car)); - #endif +  }    free_type(tmp); -  +     return pop_unfinished_type();    case T_SCOPE:    tmp = low_type_binop(op, a, b->cdr, remap,