From 1edce9425b97a8612afffddb38e140e568edc99d Mon Sep 17 00:00:00 2001 From: Martin Stjernholm <mast@lysator.liu.se> Date: Sat, 4 Nov 2000 02:34:11 +0100 Subject: [PATCH] Added some tests for the "duplicate local variable" error, and some which I think should trig it but doesn't. Rev: src/testsuite.in:1.344 --- src/testsuite.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/testsuite.in b/src/testsuite.in index 5756e744c2..7eca7159b0 100644 --- a/src/testsuite.in +++ b/src/testsuite.in @@ -1,4 +1,4 @@ -test_true([["$Id: testsuite.in,v 1.343 2000/10/21 16:29:20 grubba Exp $"]]); +test_true([["$Id: testsuite.in,v 1.344 2000/11/04 01:34:11 mast Exp $"]]); cond([[all_constants()->_verify_internals]], [[ @@ -3382,6 +3382,12 @@ test_compile_error_low([[void a(int i){} void b(function(:void) f){} void c(){b( test_compile_any([[void a(){} function(int:void) b = a;]]); test_compile_error_low([[void a(int i){} function(:void) b = a;]]); +// Duplicate local variable +test_compile_error([[void f() {int i; int i;}]]); +test_compile_error([[void f() {int i; mapping i;}]]); +test_compile_error([[void f() {int i; void i() {};}]]); +test_compile_error([[void f (int i) {string i;}]]); + // Not yet cataloged test_any(int i=10; { int i; } return i, 10) test_program(void foo(int a ,int b); function(int,int:void) a() { return foo; }) -- GitLab