﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2063	Redeclaring a derived class which has its own modifications	Mahder Alemseged Gebremedhin	Per Östlund	"I don't know if this has been reported before. If it hasn't
Consider this classes

{{{
class A
  class B
    Integer b1 = 1;
    Integer b2 = 2;
  end B;
  
  replaceable class C = B(b1=3);  
  C a1;
end A;

class D
  A d1(redeclare class C=E);
  class E
   Integer b1 = 4;
   Integer b2 = 5;
  end E;
end D;
}}}

OMC flattens this to 

{{{
class D
  Integer d1.a1.b1 = 4;
  Integer d1.a1.b2 = 5;
end D;
}}}

Dymola flattens it to

{{{
model D
  Integer d1.a1.b1 = 3;
  Integer d1.a1.b2 = 5;
end D;
}}}

I checked the specification and it says

{{{
In redeclarations some parts of the original declaration
is automatically inherited by the new declaration. This
is intended to make it easier to write declarations by 
not having to repeat common parts of the declarations, 
and does in particular apply to prefixes that must be 
identical. The inheritance only applies to the 
declaration itself and not to elements of the declaration.
}}}

Are we doing this right? (I think we are). "	defect	closed	high	1.19.0	New Instantiation	trunk	fixed	redeclaration, modification, derived	Per Östlund Adrian Pop
