This repository was archived by the owner on May 18, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -360,6 +360,8 @@ algorithm
360360 for c in components loop
361361 if Component . isNamedComponent(ComponentNode . component(c)) then
362362 // TODO: Handle components with the same name.
363+ // TODO: If duplicate components should be handled here, also
364+ // remove them from the list of components.
363365 scope := ClassTree . add(scope, ComponentNode . name(c),
364366 ClassTree . Entry . COMPONENT (idx), ClassTree . addConflictReplace);
365367 end if ;
Original file line number Diff line number Diff line change @@ -193,6 +193,7 @@ public
193193 algorithm
194194 info := match modifier
195195 case MODIFIER () then modifier. info;
196+ case REDECLARE () then SCode . elementInfo(modifier. element);
196197 else Absyn . dummyInfo;
197198 end match;
198199 end info;
@@ -448,12 +449,13 @@ protected
448449 then
449450 mod2;
450451
451- // Both modifiers have bindings , give duplicate modification error.
452- case ( MODIFIER (), MODIFIER ())
452+ // Both modifiers modify the same element , give duplicate modification error.
453+ else
453454 algorithm
454- comp_name := stringDelimitList(listReverse(mod1 . name :: prefix), "." );
455+ comp_name := stringDelimitList(listReverse(Modifier . name(mod1) :: prefix), "." );
455456 Error . addMultiSourceMessage(Error . DUPLICATE_MODIFICATIONS ,
456- {comp_name, ModifierScope . toString(scope)}, {mod1. info, mod2. info});
457+ {comp_name, ModifierScope . toString(scope)},
458+ {Modifier . info(mod1), Modifier . info(mod2)});
457459 then
458460 fail();
459461
You can’t perform that action at this time.
0 commit comments