While the Advanced Modelica Tutorial: Developing Modelica Libraries is from 2003, I would still believe that the code from page 29 would give a causal connector
(RealPort
) with a replaceable type
:
connector RealPort
replaceable type SignalType = Real;
extends SignalType;
end RealPort;
While this code works in the current release for Wolfram SystemModeler
, Open Modelica v1.16.0-dev.03 (64-bit)
complains, giving the following error:
Class 'SignalType' in 'extends SignalType' is replaceable, the base class name must be transitively non-replaceable.
So, who is right about transitive non-replaceability here and how to do this correctly?
References:
Section 6.2.1 Modelica Language Specification v3.5-dev ("Transitive non-Replaceable")
Section 7.1.4 Modelica Language Specification v3.5-dev ("Restrictions on Base Classes and Constraining Types to be Transitively Non-Replaceable")