diff options
author | sjakie | 2003-01-08 14:55:59 +0000 |
---|---|---|
committer | sjakie | 2003-01-08 14:55:59 +0000 |
commit | 641daa3443c53a63ba081011d922e50ec9e66917 (patch) | |
tree | 94c1c4f936850d7ffd093eac4b7e54f08b1b78b7 /frontend/checktypes.icl | |
parent | remove rhs of alternative with an AP_Empty pattern, to prevent (diff) |
Bug fix: uniqueness error in records
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1308 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/checktypes.icl')
-rw-r--r-- | frontend/checktypes.icl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/frontend/checktypes.icl b/frontend/checktypes.icl index 0825905..27a1d77 100644 --- a/frontend/checktypes.icl +++ b/frontend/checktypes.icl @@ -38,7 +38,8 @@ where check_type_attribute :: !TypeAttribute !TypeAttribute !TypeAttribute !*ErrorAdmin -> (!TypeAttribute,!*ErrorAdmin) check_type_attribute TA_Anonymous type_attr root_attr error | try_to_combine_attributes type_attr root_attr - = (root_attr, error) + = (to_root_attr root_attr, error) +// = (root_attr, error) = (TA_Multi, checkError "conflicting attribution of type definition" "" error) check_type_attribute TA_Unique type_attr root_attr error | try_to_combine_attributes TA_Unique type_attr || try_to_combine_attributes TA_Unique root_attr @@ -69,7 +70,12 @@ where = checkError var "uniqueness attribute not allowed" error check_attr_of_type_var attr _ error = error - + + to_root_attr (TA_Var var) + = TA_RootVar var + to_root_attr attr + = attr + instance bindTypes TypeVar where bindTypes cti tv=:{tv_name=var_id=:{id_info}} (ts, ti, cs=:{cs_symbol_table}) |