pike.git / src / pike_types.c

version» Context lines:

pike.git/src/pike_types.c:925:    /* Make a new type of the top two types. */    --Pike_compiler->type_stackp;    *Pike_compiler->type_stackp = mk_type(type,    *(Pike_compiler->type_stackp+1),    *Pike_compiler->type_stackp,    PT_COPY_BOTH);    break;       case T_PROGRAM:    if ((*Pike_compiler->type_stackp)->type != T_OBJECT) { +  struct pike_type *t = (*Pike_compiler->type_stackp); +  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;    } -  +  }    /* FALL_THROUGH */    case T_ARRAY:    case T_MULTISET:    case T_NOT:    case T_TYPE:    case T_STRING:    /* 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);