From 8846477c222cdae649b02117cc96999b0be6ad40 Mon Sep 17 00:00:00 2001 From: fche Date: Sat, 4 Jun 2005 02:35:18 +0000 Subject: 2005-06-03 Frank Ch. Eigler * elaborate.cxx (find_*): Remove arity checks from here ... * staptree.cxx (set_arity): Put arity match assertion here. * testsuite/semko/{six,nine}.stp: Confirm logic. * testsuite/transko/one.stp: First translation-time ko test. --- staptree.cxx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'staptree.cxx') diff --git a/staptree.cxx b/staptree.cxx index a8651d1d..756fbc1e 100644 --- a/staptree.cxx +++ b/staptree.cxx @@ -96,10 +96,17 @@ void vardecl::set_arity (int a) { assert (a >= 0); - arity = a; - index_types.resize (arity); - for (int i=0; i= 0) + throw semantic_error ("inconsistent arity", tok); + + if (arity != a) + { + arity = a; + index_types.resize (arity); + for (int i=0; i