Branch: Tag:

2019-07-11

2019-07-11 09:55:33 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Warn about indexing of deprecated values.

5361:    case T_NOT:    return low_check_indexing(type->car, index_type, n) != 1;    -  case PIKE_T_NAME: +     case PIKE_T_ATTRIBUTE: -  +  if (low_check_indexing(type->cdr, index_type, n)) { +  /* Valid index, so let's check if the attribute +  * handler has any other opinion. +  */ +  ref_push_string((struct pike_string *)type->car); +  ref_push_type_value(type->cdr); +  ref_push_type_value(index_type); +  safe_apply_current2(PC_INDEX_TYPE_ATTRIBUTE_FUN_NUM, 3, +  "index_type_attribute"); +  if ((TYPEOF(Pike_sp[-1]) == T_INT) && +  (SUBTYPEOF(Pike_sp[-1]) == NUMBER_NUMBER) && +  (!Pike_sp[-1].u.integer)) { +  pop_stack(); +  return 0; +  } +  pop_stack(); +  return 1; +  } +  return 0; +  +  case PIKE_T_NAME:    case T_ASSIGN:    case T_SCOPE:    return low_check_indexing(type->cdr, index_type, n);