#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: | perost |
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 Changed 14 years ago by dhedberg
comment:2 Changed 14 years ago by adrpo
Similar to almost duplicate of [BUG:1126].
comment:3 Changed 10 years ago by sjoelund.se
- Cc perost added; dhedberg removed
- Component set to Frontend
comment:4 Changed 8 years ago by dietmarw
- Milestone set to Future
comment:5 Changed 3 years ago by perost
- Resolution set to fixed
- Status changed from new to closed
The new frontend handles this correctly.
comment:6 Changed 3 years ago by casella
- Milestone changed from Future to 1.16.0
The corresponding ticket in MathCore Track is 1944.