Opened 9 years ago
Closed 3 years ago
#3476 closed defect (fixed)
Replaceable package in connector causes translation error
Reported by: | markusd | Owned by: | somebody |
---|---|---|---|
Priority: | high | Milestone: | 1.16.0 |
Component: | New Instantiation | Version: | |
Keywords: | Cc: | henrikt |
Description
Validation of connectorTest.testModel will yield the following error:
Translation Error: Variable Medium.nS not found in scope connectorTest.advConnector$something.
Translation Error: Error occurred while flattening model connectorTest.testModel
package connectorTest partial package partialMedium constant Integer nX; end partialMedium; connector advConnector replaceable package Medium = connectorTest.OtherMedium; Modelica.SIunits.Pressure p; flow Modelica.SIunits.MassFlowRate m_flow; stream Modelica.SIunits.Mass C_flow[Medium.nS]; end advConnector; package PackageExample extends connectorTest.partialMedium(nX = 2); final constant Integer nS = 3; end PackageExample; package OtherMedium final constant Integer nS = 3; end OtherMedium; model testModel replaceable package Medium = PackageExample; connectorTest.advConnector something(redeclare package Medium = Medium); end testModel; end connectorTest;
Attachments (1)
Change History (3)
Changed 9 years ago by markusd
comment:1 Changed 9 years ago by lochel
- Component changed from Unknown to Frontend
comment:2 Changed 3 years ago by perost
- Component changed from Frontend to New Instantiation
- Milestone changed from Future to 1.16.0
- Resolution set to fixed
- Status changed from new to closed
This works fine in the new frontend.