pike.git / src / las.c

version» Context lines:

pike.git/src/las.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: las.c,v 1.404 2008/01/28 18:41:50 grubba Exp $ + || $Id: las.c,v 1.405 2008/02/26 21:51:37 grubba Exp $   */      #include "global.h"   #include "interpret.h"   #include "las.h"   #include "array.h"   #include "object.h"   #include "stralloc.h"   #include "dynamic_buffer.h"   #include "lex.h"
pike.git/src/las.c:3465:       case F_PUSH_ARRAY:    if (CAR(n)) {    struct pike_type *array_type;    MAKE_CONSTANT_TYPE(array_type, tArr(tZero));    if (!pike_types_le(array_type, CAR(n)->type)) {    yytype_error("Bad argument to splice operator.",    array_type, CAR(n)->type, 0);    }    free_type(array_type); -  } +     /* FIXME: The type field of the splice operator is not yet utilized.    *    * It probably ought to be something similar to MANY(..., VOID).    */    n->type = index_type(CAR(n)->type, int_type_string, n); -  +  } else { +  copy_pike_type(n->type, mixed_type_string); +  }    break;       case F_AUTO_MAP_MARKER:    if (!CAR(n) || (CAR(n)->type == void_type_string)) {    yyerror("Indexing a void expression.");    /* The optimizer converts this to an expression returning 0. */    copy_pike_type(n->type, zero_type_string);    } else {    type_a=CAR(n)->type;    if(!match_types(type_a, array_type_string))