﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1174	Check model reports errors for correct models and vice versa.	dhedberg	dhedberg	"The kernel fails to recognize the modification of x in the extends clause in model B, resulting in an error that A.x is not identical to B.x when checking model B.

{{{
model A
  Integer x;
end A;

model B
  extends A(x=2);
  Integer x=2;
end B;
}}}

Kernel reports the following error:
Check of B failed
Error: Duplicate elements (due to inherited elements) not identical, first element is:  Integer x = 2; // from baseclass: <nothing>
, second element is:  Integer x; // from baseclass: A

Error: Error occured while flattening model B

The error itself could be re-structured with line breaks etc, also the comment ""// from baseclass: <nothing>"" could be improved. The element is locally declared and not inherited at all.

For the same reason the kernel incorrectly reports the erronous model B below as correct when checking it:

{{{
model A
  Integer x=2;
end A;

model B
  extends A(x=3);
  Integer x=2;
end B;
}}}"	defect	closed	high	1.16.0	Frontend		fixed		Per Östlund
