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.158 2000/01/04 00:49:52 grubba Exp $"); + RCSID("$Id: las.c,v 1.159 2000/01/04 00:58:07 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:2460:    }    }    }    copy_shared_string(n->type,void_type_string);    break;       case F_CASE:    if (CDR(n) && CAR(n)) {    /* case 1 .. 2: */    if (!match_types(CAR(n)->type, CDR(n)->type)) { +  if (!match_types(CAR(n)->type, int_type_string) || +  !match_types(CDR(n)->type, int_type_string)) {    yytype_error("Type mismatch in case range.",    CAR(n)->type, CDR(n)->type, 0); -  +  }    } else if ((lex.pragmas & ID_STRICT_TYPES) &&    (CAR(n)->type != CDR(n)->type)) {    /* The type should be the same for both CAR & CDR. */    if (!pike_types_le(CDR(n)->type, CAR(n)->type)) {    yytype_error("Type mismatch in case range.",    CAR(n)->type, CDR(n)->type, YYTE_IS_WARNING);    } else if (!pike_types_le(CAR(n)->type, CDR(n)->type)) {    yytype_error("Type mismatch in case range.",    CDR(n)->type, CAR(n)->type, YYTE_IS_WARNING);    }