pike.git
/
src
/
program.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/program.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: program.c,v 1.
693
2008/05/
13
17
:
11
:
18
grubba Exp $
+
|| $Id: program.c,v 1.
694
2008/05/
14
10
:
52
:
47
grubba Exp $
*/ #include "global.h" #include "program.h" #include "object.h" #include "dynamic_buffer.h" #include "pike_types.h" #include "stralloc.h" #include "las.h" #include "lex.h"
pike.git/src/program.c:4901:
{ int n2; if(ID_FROM_INT(Pike_compiler->new_program, n)->type != type && !pike_types_le(type, ID_FROM_INT(Pike_compiler->new_program, n)->type)) { if (!match_types(ID_FROM_INT(Pike_compiler->new_program, n)->type, type)) { my_yyerror("Illegal to redefine inherited variable %S " "with different type.", name);
+
yytype_error(NULL,
+
ID_FROM_INT(Pike_compiler->new_program, n)->type,
+
type, 0);
return n; } else { yywarning("Redefining inherited variable %S " "with different type.", name);
-
+
yytype_error(NULL,
+
ID_FROM_INT(Pike_compiler->new_program, n)->type,
+
type, YYTE_IS_WARNING);
} } if(!IDENTIFIER_IS_VARIABLE(ID_FROM_INT(Pike_compiler->new_program, n)-> identifier_flags)) {
-
my_yyerror("Illegal to redefine inherited
variable
%S "
-
"
with
different
type
.", name);
+
my_yyerror("Illegal to redefine inherited
symbol
%S "
+
"
to
a
variable
.", name);
return n; } if ((ID_FROM_INT(Pike_compiler->new_program, n)->run_time_type != PIKE_T_MIXED) && (ID_FROM_INT(Pike_compiler->new_program, n)->run_time_type != compile_type_to_runtime_type(type))) { my_yyerror("Illegal to redefine inherited variable %S " "with different type.", name);
-
+
yytype_error(NULL,
+
ID_FROM_INT(Pike_compiler->new_program, n)->type,
+
type, 0);
return n; } /* Create an alias for the old variable reference, so that we * can change the compile-time type. */ n2 = define_alias(name, type, flags & ~ID_EXTERN, 0, n); /* Hide the old variable. */ Pike_compiler->new_program->identifier_references[n].id_flags |= ID_HIDDEN;