#1078 closed defect (fixed)
Improve error message when trying to override a final parameter/variable (from MathCore)
Reported by: | krsta | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | high | Milestone: | 1.9.4 |
Component: | Frontend | Version: | |
Keywords: | Cc: | krsta, Martin Sjölund |
Description
Here is a simple model where an illegal modification of a (final) unit is performed. The error message is not clear what to do. It should at least mention which parameter/variable that is modified, i.e., "unit" in this case.
model Test parameter Modelica.SIunits.Distance di(unit="m")=0.125 "Inner pipe diameter"; end Test;
Error message:
[:2:4-2:80:readonly]: Variable di: trying to override final variable in class: Real [:2:4-2:80:readonly]: Variable di: Error occured while flattening model Test
Change History (13)
comment:1 by , 15 years ago
comment:2 by , 14 years ago
Trunk now says
{{{[b.mo:2:4-2:80:writable] Error: Variable di: trying to override final variable in class: Real
by using modifiers: di( = "m", = final "m") that do not agree.}}}
I'm assuming this was the desired error message
comment:3 by , 11 years ago
Cc: | krsta, → krsta |
---|---|
Component: | → Backend |
Resolution: | fixed |
Status: | closed → reopened |
Reopening, as there is currently no error message at all.
comment:5 by , 10 years ago
Component: | Backend → Frontend |
---|---|
Milestone: | → 1.9.1 |
Owner: | changed from | to
Status: | reopened → assigned |
Simpler model:
model Test type Distance = Real(final unit="m"); parameter Distance di(unit="mm")=0.125; end Test;
comment:6 by , 10 years ago
Milestone: | 1.9.1 → 1.9.2 |
---|
This ticket was not closed for 1.9.1, which has now been released. It was batch modified for milestone 1.9.2 (but maybe an empty milestone was more appropriate; feel free to change it).
comment:7 by , 10 years ago
Milestone: | 1.9.2 → 1.9.3 |
---|
Milestone changed to 1.9.3 since 1.9.2 was released.
comment:10 by , 9 years ago
Owner: | changed from | to
---|---|
Status: | assigned → accepted |
comment:11 by , 9 years ago
Milestone: | 1.9.5 → 1.9.4 |
---|---|
Resolution: | → fixed |
Status: | accepted → closed |
This was fixed in the 1.9.4 release.
http://intranet/trac/mathmodelica/ticket/1604