pike.git / src / pike_types.c

version» Context lines:

pike.git/src/pike_types.c:982:      /* Pop one level of types. This is the inverse of push_type() */   void debug_pop_type_stack(unsigned int expected)   {    struct pike_type *top;    if(Pike_compiler->type_stackp<type_stack)    Pike_fatal("Type stack underflow\n");       top = *(Pike_compiler->type_stackp);    /* Special case... */ -  if (top->type == T_MIXED) return; /* Probably due to an earlier error */ +  if ((top->type == T_MIXED) || +  ((top == any_type_string) && (expected != T_OR))) { +  /* Probably due to an earlier error */ +  return; +  }       Pike_compiler->type_stackp--;   #ifdef PIKE_DEBUG    if ((top->type != expected) &&    (top->type != PIKE_T_NAME) &&    (top->type != PIKE_T_ATTRIBUTE)) {    Pike_fatal("Unexpected type on stack: %d (expected %d)\n", top->type, expected);    }   #endif /* PIKE_DEBUG */    /* OPTIMIZE: It looks like this function is always called with