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.396 2007/11/10 21:36:27 nilsson Exp $ + || $Id: las.c,v 1.397 2007/11/20 18:19:21 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:1253: Inside #if 0
  #if 0    /* It's not always safe to ignore the cast in this case. E.g. if n    * has type program, the value can contain a function style program    * pointer which the cast will turn into a real program    * reference. */    if(type==n->type) return n;   #endif       res = mkemptynode();    res->token = F_CAST; +  +  /* FIXME: Consider strengthening the node type [bug 4435]. +  * E.g. the cast in the code +  * +  * mapping(string:string) m = (["a":"A", "b":"B"]); +  * return (array)m; +  * +  * should have a result type of array(array(string)), +  * rather than array(mixed). +  */    copy_pike_type(res->type, type);       if(match_types(object_type_string, type) ||    match_types(program_type_string, type))    res->node_info |= OPT_SIDE_EFFECT;       res->tree_info |= n->tree_info;       _CAR(res) = n;    _CDR(res) = mktypenode(type);