﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2727	Inherited modifications are lost when redeclaring a component.	Peter Aronsson	Adrian Pop	"Consider the following models:
{{{
package Bug
  model M1
    replaceable Modelica.Blocks.Sources.Clock clock;
  end M1;

  model M2
    extends M1(clock.offset = 10, clock.startTime = 20);
  end M2;

  model M3
    extends M2(redeclare Modelica.Blocks.Sources.ExpSine clock);
  end M3;
end Bug;
}}}

Instantiate Bug.M2 (correct result):
{{{
class Bug.M2
  output Real clock.y \""Connector of Real output signal\"";
  parameter Real clock.offset(quantity = \""Time\"", unit = \""s\"") = 10.0 \""Offset of output signal\"";
  parameter Real clock.startTime(quantity = \""Time\"", unit = \""s\"") = 20.0 \""Output = offset for time < startTime\"";
equation
  clock.y = clock.offset + (if time < clock.startTime then 0.0 else time - clock.startTime);
end Bug.M2;
}}}
Instantiate Bug.M3 (the modification clock.startTime=10 and clock.startTime=20 that should have been inherited from Bug.M2 are lost):
{{{
class Bug.M3
  output Real clock.y \""Connector of Real output signal\"";
  parameter Real clock.amplitude = 1.0 \""Amplitude of sine wave\"";
  parameter Real clock.freqHz(quantity = \""Frequency\"", unit = \""Hz\"", start = 2.0) \""Frequency of sine wave\"";
  parameter Real clock.phase(quantity = \""Angle\"", unit = \""rad\"", displayUnit = \""deg\"") = 0.0 \""Phase of sine wave\"";
  parameter Real clock.damping(quantity = \""DampingCoefficient\"", unit = \""s-1\"", start = 1.0) \""Damping coefficient of sine wave\"";
  parameter Real clock.offset = 0.0 \""Offset of output signal\"";
  parameter Real clock.startTime(quantity = \""Time\"", unit = \""s\"") = 0.0 \""Output = offset for time < startTime\"";
  protected constant Real clock.pi = 3.141592653589793;
equation
  clock.y = clock.offset + (if time < clock.startTime then 0.0 else clock.amplitude * exp((clock.startTime - time) * clock.damping) * sin(6.283185307179586 * clock.freqHz * (time - clock.startTime) + clock.phase));
end Bug.M3
}}}
"	defect	closed	high	1.9.1	Frontend	trunk	fixed		
