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 +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -677,7 +677,7 @@ public
677677 output Boolean isPkgConst;
678678 algorithm
679679 isPkgConst := match cref
680- case CREF (node = InstNode . CLASS_NODE (nodeType = InstNodeType . NORMAL_CLASS ())) then true ;
680+ case CREF (node = InstNode . CLASS_NODE ()) then InstNode . isUserdefinedClass(cref . node) ;
681681 case CREF (origin = Origin . CREF ) then isPackageConstant(cref. restCref);
682682 else false ;
683683 end match;
Original file line number Diff line number Diff line change @@ -331,6 +331,22 @@ uniontype InstNode
331331 end match;
332332 end isBaseClass;
333333
334+ function isUserdefinedClass
335+ input InstNode node;
336+ output Boolean isUserdefined;
337+ algorithm
338+ isUserdefined := match node
339+ case CLASS_NODE ()
340+ then match node. nodeType
341+ case InstNodeType . NORMAL_CLASS () then true ;
342+ case InstNodeType . BASE_CLASS () then true ;
343+ case InstNodeType . DERIVED_CLASS () then true ;
344+ else false ;
345+ end match;
346+ else false ;
347+ end match;
348+ end isUserdefinedClass;
349+
334350 function isComponent
335351 input InstNode node;
336352 output Boolean isComponent;
You can’t perform that action at this time.
0 commit comments