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.348 2005/06/09 17:57:56 mast Exp $ + || $Id: las.c,v 1.349 2006/01/09 13:18:19 grubba Exp $   */      #include "global.h" - RCSID("$Id: las.c,v 1.348 2005/06/09 17:57:56 mast Exp $"); + RCSID("$Id: las.c,v 1.349 2006/01/09 13:18:19 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:3554:    }else{    n->type = or_pike_types(CAR(n)->type, CDR(n)->type, 0);    }    break;       case F_ASSIGN:    if (!CAR(n) || (CAR(n)->type == void_type_string)) {    my_yyerror("Assigning a void expression.");    copy_pike_type(n->type, void_type_string);    break; +  } else if (!CDR(n)) { +  copy_pike_type(n->type, CAR(n)->type); +  break;    } else if(CAR(n) && CDR(n)) {    /* Ensure that the type-fields are up to date. */    fix_type_field(CAR(n));    fix_type_field(CDR(n));    if (!pike_types_le(CAR(n)->type, CDR(n)->type)) {    /* a["b"]=c and a->b=c can be valid when a is an array */    if (((CDR(n)->token != F_INDEX &&    CDR(n)->token != F_ARROW) ||    !match_types(array_type_string, CDR(n)->type)) &&    !match_types(CDR(n)->type,CAR(n)->type)) {