Commit 14cb3e3f authored by John van Groningen's avatar John van Groningen
Browse files

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.
parent 1817dfc4
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment