diff options
author | johnvg | 2007-11-20 12:06:57 +0000 |
---|---|---|
committer | johnvg | 2007-11-20 12:06:57 +0000 |
commit | 15ccc8389b593220c7fbb4b750be4fb843e796ff (patch) | |
tree | 1f302141f241f3ff52bceedacbec0a06999166f6 /frontend/checktypes.icl | |
parent | remove ExclamationToken from context independent tokens to (diff) |
do not allow a . before (c a) in the type of a constructor,
because all attributes of c should have the same attribute
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1691 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 7d969bf..bc0ca57 100644 --- a/frontend/checktypes.icl +++ b/frontend/checktypes.icl @@ -69,6 +69,8 @@ where 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 TA_Anonymous (CV tv :@: types) error + = checkError tv "attribute variable not allowed" error check_attr_of_type_var attr _ error = error @@ -704,12 +706,10 @@ checkOpenAType mod_index scope dem_attr type=:{at_type = arg_type --> result_typ (result_type, (ots, oti, cs)) = checkOpenAType mod_index scope DAK_None result_type cot_state (new_attr, oti, cs) = newAttribute dem_attr "-->" at_attribute oti cs = ({ type & at_type = arg_type --> result_type, at_attribute = new_attr }, (ots, oti, cs)) -//AA.. checkOpenAType mod_index scope dem_attr type=:{at_type = TArrow1 arg_type, at_attribute} cot_state # (arg_type, (ots, oti, cs)) = checkOpenAType mod_index scope DAK_None arg_type cot_state (new_attr, oti, cs) = newAttribute dem_attr "TArrow1" at_attribute oti cs = ({ type & at_type = TArrow1 arg_type, at_attribute = new_attr }, (ots, oti, cs)) -//..AA /* checkOpenAType mod_index scope dem_attr type=:{at_type = CV tv :@: types, at_attribute} (ots, oti, cs) # (cons_var, _, (oti, cs)) = checkTypeVar scope DAK_None tv TA_Multi (oti, cs) |