diff options
author | johnvg | 2001-03-26 14:24:00 +0000 |
---|---|---|
committer | johnvg | 2001-03-26 14:24:00 +0000 |
commit | f640fd1ab0b131440855301cabaec70b20177c18 (patch) | |
tree | 15160ce4c28d8a25c36c93c6169b865d26e7bdf3 /frontend/checktypes.icl | |
parent | added check for error after 'combineDclAndIclModule' to (diff) |
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
Diffstat (limited to 'frontend/checktypes.icl')
-rw-r--r-- | frontend/checktypes.icl | 4 |
1 files changed, 2 insertions, 2 deletions
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 |