From 15ccc8389b593220c7fbb4b750be4fb843e796ff Mon Sep 17 00:00:00 2001 From: johnvg Date: Tue, 20 Nov 2007 12:06:57 +0000 Subject: 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 --- frontend/checktypes.icl | 4 ++-- 1 file 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) -- cgit v1.2.3