Branch: Tag:

2014-12-04

2014-12-04 19:25:19 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Fixed bug in handling of program(named_type).

program(named_type) got converted to type(named_type) even
when named_type was a named object type. This broke the
type checking of calls of named program variables.

932:       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: