diff options
author | martinw | 2001-03-23 15:59:24 +0000 |
---|---|---|
committer | martinw | 2001-03-23 15:59:24 +0000 |
commit | 0ba771a10fa814eabfee67e25bf7c3ab2dd80248 (patch) | |
tree | aecdb71efb9c9d16921518a14e6ccbb70fbff2c2 /frontend/checktypes.icl | |
parent | Sjaak: removed call to showComponents (diff) |
fixing several bugs
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@338 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/checktypes.icl')
-rw-r--r-- | frontend/checktypes.icl | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/frontend/checktypes.icl b/frontend/checktypes.icl index cfa64cf..844a04a 100644 --- a/frontend/checktypes.icl +++ b/frontend/checktypes.icl @@ -29,7 +29,8 @@ instance bindTypes AType where bindTypes cti atype=:{at_attribute,at_type} ts_ti_cs # (at_type, type_attr, (ts, ti, cs)) = bindTypes cti at_type ts_ti_cs - (combined_attribute, cs_error) = check_type_attribute at_attribute type_attr cti.cti_lhs_attribute cs.cs_error + cs_error = check_attr_of_type_var at_attribute at_type cs.cs_error + (combined_attribute, cs_error) = check_type_attribute at_attribute type_attr cti.cti_lhs_attribute cs_error = ({ atype & at_attribute = combined_attribute, at_type = at_type }, combined_attribute, (ts, ti, { cs & cs_error = cs_error })) where check_type_attribute :: !TypeAttribute !TypeAttribute !TypeAttribute !*ErrorAdmin -> (!TypeAttribute,!*ErrorAdmin) @@ -60,6 +61,13 @@ where try_to_combine_attributes _ _ = False + check_attr_of_type_var :: !TypeAttribute !Type !*ErrorAdmin -> .ErrorAdmin + check_attr_of_type_var TA_Unique (TV var) error + // the case "TA_Var" is catched by check_type_attribute + = checkError var "uniqueness attribute not allowed" error + check_attr_of_type_var attr _ error + = error + instance bindTypes TypeVar where bindTypes cti tv=:{tv_name=var_id=:{id_info}} (ts, ti, cs=:{cs_symbol_table /* TD ... */, cs_x={x_type_var_position,x_is_dcl_module} /* ... TD */ }) |