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.33 1997/05/19 23:31:01 hubbe Exp $"); + RCSID("$Id: las.c,v 1.34 1997/05/22 23:27:32 hubbe 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:1271:    if(CADR(n)->type == CDDR(n)->type)    {    copy_shared_string(n->type,CADR(n)->type);    return;    }       copy_shared_string(n->type,mixed_type_string);    break;       case F_RETURN: +  if(CAR(n)->type == void_type_string) +  { +  yyerror("You cannot return a void expression"); +  }    if(local_variables &&    local_variables->current_return_type &&    !match_types(local_variables->current_return_type,CAR(n)->type) &&    !(    local_variables->current_return_type==void_type_string &&    CAR(n)->token == F_CONSTANT &&    IS_ZERO(& CAR(n)->u.sval)    )    )    {