From 9eaa6e0c3f136df08e240b476b88c769c957468e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net> Date: Sat, 12 Feb 2000 21:09:05 -0800 Subject: [PATCH] made some approximate bugfixes Rev: src/program.c:1.203 Rev: src/testsuite.in:1.277 --- src/program.c | 10 ++++++---- src/testsuite.in | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/program.c b/src/program.c index 5cdad7da8a..4272d8a8e0 100644 --- a/src/program.c +++ b/src/program.c @@ -5,7 +5,7 @@ \*/ /**/ #include "global.h" -RCSID("$Id: program.c,v 1.202 2000/02/10 17:58:08 hubbe Exp $"); +RCSID("$Id: program.c,v 1.203 2000/02/13 05:09:04 hubbe Exp $"); #include "program.h" #include "object.h" #include "dynamic_buffer.h" @@ -1928,9 +1928,11 @@ int define_variable(struct pike_string *name, if(!(IDENTIFIERP(n)->id_flags & ID_INLINE) || compiler_pass!=1) { -/* if(ID_FROM_INT(new_program, n)->type != type) */ -/* my_yyerror("Illegal to redefine inherited variable " */ -/* "with different type."); */ + if(!match_types(ID_FROM_INT(new_program, n)->type, type)) + my_yyerror("Illegal to redefine inherited variable " + "with different type."); + + if(!IDENTIFIER_IS_VARIABLE(ID_FROM_INT(new_program, n)-> identifier_flags)) diff --git a/src/testsuite.in b/src/testsuite.in index 4d79cf9ebc..9fef2a23df 100644 --- a/src/testsuite.in +++ b/src/testsuite.in @@ -1,5 +1,5 @@ dnl -*- Pike -*- -test_true([["$Id: testsuite.in,v 1.276 2000/02/11 19:26:54 hubbe Exp $"]]); +test_true([["$Id: testsuite.in,v 1.277 2000/02/13 05:09:05 hubbe Exp $"]]); cond([[all_constants()->_verify_internals]], [[ @@ -4448,17 +4448,17 @@ int a() test_compile_any(class A {int v;} class B {inherit A; int v;}) test_compile_error_low(class A {int v;} class B {inherit A; float v;}) -test_compile_error_low(class A {int v;} class B {inherit A; mixed v;}) -test_compile_error_low(class A {mixed v;} class B {inherit A; int v;}) -test_compile_error_low(class A {public int v;} class B {inherit A; mixed v;}) -test_compile_error_low(class A { public { int v; } } class B {inherit A; mixed v;}) -test_compile_error_low(class A {public mixed v;} class B {inherit A; int v;}) +dnl test_compile_error_low(class A {int v;} class B {inherit A; mixed v;}) +dnl test_compile_error_low(class A {mixed v;} class B {inherit A; int v;}) +dnl test_compile_error_low(class A {public int v;} class B {inherit A; mixed v;}) +dnl test_compile_error_low(class A { public { int v; } } class B {inherit A; mixed v;}) +dnl test_compile_error_low(class A {public mixed v;} class B {inherit A; int v;}) test_compile_error_low(class A {static int v;} class B {inherit A; float v;}) -test_compile_error_low(class A {static int v;} class B {inherit A; mixed v;}) -test_compile_error_low(class A {static mixed v;} class B {inherit A; int v;}) +dnl test_compile_error_low(class A {static int v;} class B {inherit A; mixed v;}) +dnl test_compile_error_low(class A {static mixed v;} class B {inherit A; int v;}) test_compile_any(class A {private int v;} class B {inherit A; float v;}) -test_compile_any(class A {private int v;} class B {inherit A; mixed v;}) -test_compile_any(class A {private mixed v;} class B {inherit A; int v;}) +dnl test_compile_any(class A {private int v;} class B {inherit A; mixed v;}) +dnl test_compile_any(class A {private mixed v;} class B {inherit A; int v;}) test_compile_error_low(class A {final int v;} class B {inherit A; int v;}) test_compile_error_low(class A {final int v;} class B {inherit A; final int v;}) test_compile_error_low(class A {nomask int v;} class B {inherit A; int v;}) -- GitLab