From f640fd1ab0b131440855301cabaec70b20177c18 Mon Sep 17 00:00:00 2001 From: johnvg Date: Mon, 26 Mar 2001 14:24:00 +0000 Subject: Return TE in 'bindtypes' for 'Type' instead of TA with incorrect module and type index when the symbol is not defined or used with incorrect arity. This prevents a crash later in the compiler when the type is used again when expanding type synonyms resulting in an 'index out of range' error. git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@342 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d --- frontend/checktypes.icl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'frontend') diff --git a/frontend/checktypes.icl b/frontend/checktypes.icl index 932b01e..c50c9a5 100644 --- a/frontend/checktypes.icl +++ b/frontend/checktypes.icl @@ -109,8 +109,8 @@ where = (TA { type_cons & type_index = { glob_object = type_index, glob_module = type_module}} types, cti_lhs_attribute, ts_ti_cs) = (TA { type_cons & type_index = { glob_object = type_index, glob_module = type_module}} types, determine_type_attribute td_attribute, ts_ti_cs) - = (type, TA_Multi, (ts, ti, { cs & cs_error = checkError type_cons.type_name " used with wrong arity" cs.cs_error })) - = (type, TA_Multi, (ts, ti, { cs & cs_error = checkError type_cons.type_name " undefined" cs.cs_error})) + = (TE /* JVG was: type */, TA_Multi, (ts, ti, { cs & cs_error = checkError type_cons.type_name " used with wrong arity" cs.cs_error })) + = (TE /* JVG was: type */, TA_Multi, (ts, ti, { cs & cs_error = checkError type_cons.type_name " undefined" cs.cs_error})) where determine_type_attribute TA_Unique = TA_Unique determine_type_attribute _ = TA_Multi -- cgit v1.2.3