@@ -606,7 +606,7 @@ algorithm
606606 mod := Modifier . merge(cls_mod, mod);
607607
608608 // Apply the modifiers of extends nodes.
609- ClassTree . mapExtends(cls_tree, function modifyExtends(scope = par));
609+ ClassTree . mapExtends(cls_tree, function modifyExtends(scope = par, parent = par ));
610610
611611 // Apply modifier in this scope.
612612 applyModifier(mod, cls_tree, InstNode . name(node));
@@ -772,6 +772,7 @@ end instImport;
772772function modifyExtends
773773 input output InstNode extendsNode;
774774 input InstNode scope;
775+ input InstNode parent;
775776protected
776777 SCode . Element elem;
777778 Absyn . Path basepath;
@@ -782,12 +783,12 @@ protected
782783 ClassTree cls_tree;
783784algorithm
784785 cls_tree := Class . classTree(InstNode . getClass(extendsNode));
785- ClassTree . mapExtends(cls_tree, function modifyExtends(scope = extendsNode));
786+ ClassTree . mapExtends(cls_tree, function modifyExtends(scope = extendsNode, parent = parent ));
786787
787788 // Replace the node in the node type with the given scope, so that crefs found
788789 // in this extends are prefixed correctly.
789790 InstNodeType . BASE_CLASS (definition = elem) := InstNode . nodeType(extendsNode);
790- extendsNode := InstNode . setNodeType(InstNodeType . BASE_CLASS (scope , elem), extendsNode);
791+ extendsNode := InstNode . setNodeType(InstNodeType . BASE_CLASS (parent , elem), extendsNode);
791792
792793 // Create a modifier from the extends.
793794 ext_mod := Modifier . fromElement(elem, InstNode . level(scope) + 1 , scope);
0 commit comments