pike.git / src / pike_types.cmod

version» Context lines:

pike.git/src/pike_types.cmod:1078:    while ((t->type == PIKE_T_NAME) || (t->type == PIKE_T_ATTRIBUTE)) {    t = t->cdr;    }    if (t->type != T_OBJECT) {    /* Not a program type, convert it to a type type. */    type = T_TYPE;    }    }    /* FALLTHRU */    case T_MULTISET: -  case T_NOT: +     case T_TYPE:    case PIKE_T_AUTO:    /* Make a new type of the top type, and put it in car. */    *Pike_compiler->type_stackp = mk_type(type,    *Pike_compiler->type_stackp, NULL,    PT_COPY_CAR);    break;    -  +  case T_NOT: +  /* Make a new type of the top type, and put it in car. +  * +  * Special case: Remove double inversions. +  */ +  { +  struct pike_type *t = *Pike_compiler->type_stackp; +  if (t->type == T_NOT) { +  *Pike_compiler->type_stackp = t->car; +  add_ref(t->car); +  free_type(t); +  break; +  } +  *Pike_compiler->type_stackp = mk_type(type, t, NULL, PT_COPY_CAR); +  } +  break; +     case T_SCOPE:    case T_ASSIGN:    case T_INT:    case T_OBJECT:    case PIKE_T_ATTRIBUTE:    case PIKE_T_NAME:    default:    /* Should not occur. */    Pike_fatal("Unsupported argument to push_type(): %d\n", type);    break;