pike.git / src / las.c

version» Context lines:

pike.git/src/las.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   /**/   #include "global.h" - RCSID("$Id: las.c,v 1.116 1999/11/19 17:00:13 grubba Exp $"); + RCSID("$Id: las.c,v 1.117 1999/11/19 21:08:05 grubba Exp $");      #include "language.h"   #include "interpret.h"   #include "las.h"   #include "array.h"   #include "object.h"   #include "stralloc.h"   #include "dynamic_buffer.h"   #include "lex.h"   #include "pike_types.h"
pike.git/src/las.c:2018:    if(!catch_level)    my_yyerror("Indexing on illegal type.");    n->type=index_type(type_a,n);    }    break;       case F_APPLY:    if (!CAR(n) || (CAR(n)->type == void_type_string)) {    my_yyerror("Calling a void expression.");    /* The optimizer converts this to an expression returning 0. */ +  if (!n->type) {    copy_shared_string(n->type, mixed_type_string); -  +  }    } else {    struct pike_string *s;    struct pike_string *f;    INT32 max_args,args;    push_type(T_MIXED); /* match any return type, even void */    push_type(T_VOID); /* not varargs */    push_type(T_MANY);    function_type_max=0;    low_build_function_type(CDR(n));    push_type(T_FUNCTION);