#1174 closed defect (fixed)
Check model reports errors for correct models and vice versa.
Reported by: | dhedberg | Owned by: | dhedberg |
---|---|---|---|
Priority: | high | Milestone: | 1.16.0 |
Component: | Frontend | Version: | |
Keywords: | Cc: | Per Östlund |
Description
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;
Change History (6)
comment:1 by , 15 years ago
comment:3 by , 10 years ago
Cc: | added; removed |
---|---|
Component: | → Frontend |
comment:4 by , 9 years ago
Milestone: | → Future |
---|
comment:5 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
The new frontend handles this correctly.
comment:6 by , 4 years ago
Milestone: | Future → 1.16.0 |
---|
The corresponding ticket in MathCore Track is 1944.