Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit 564c405

Browse files
sjoelundOpenModelica-Hudson
authored andcommitted
Lift restriction on connector extending from type
This resolves ticket:4471
1 parent 2432a47 commit 564c405

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Compiler/FrontEnd/ClassInf.mo

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,7 @@ algorithm
566566
case (BLOCK(),SCode.R_BLOCK()) then ();
567567
case (MODEL(),SCode.R_MODEL()) then ();
568568

569+
case (CONNECTOR(),SCode.R_TYPE()) then ();
569570
case (CONNECTOR(isExpandable=false),SCode.R_CONNECTOR(false)) then ();
570571
case (CONNECTOR(isExpandable=true),SCode.R_CONNECTOR(true)) then ();
571572
case (HAS_RESTRICTIONS(hasEquations=false,hasConstraints=false,hasAlgorithms=false),SCode.R_CONNECTOR(_)) then ();
@@ -577,6 +578,7 @@ algorithm
577578
case (TYPE_CLOCK(),SCode.R_CONNECTOR(_)) then ();
578579
case (TYPE_ENUM(),SCode.R_CONNECTOR(_)) then (); // used in Modelica.Electrical.Digital where we have an enum as a connector
579580
case (ENUMERATION(),SCode.R_CONNECTOR(_)) then (); // used in Modelica.Electrical.Digital where we have an enum as a connector
581+
case (TYPE(),SCode.R_CONNECTOR()) then (); // Note: Only allowed in some cases (outputs, etc). Happens when the base class is type T extends Real; end T;
580582

581583
case (TYPE(),SCode.R_TYPE()) then ();
582584
case (TYPE_INTEGER(),SCode.R_TYPE()) then ();

0 commit comments

Comments
 (0)