#3698 closed defect (fixed)
Comment preserving parsing/unparsing creates hidden duplicate declarations
| Reported by: | Francesco Casella | Owned by: | Adeel Asghar |
|---|---|---|---|
| Priority: | blocker | Milestone: | 1.9.4 |
| Component: | OMEdit | Version: | v1.9.4-dev-nightly |
| Keywords: | Cc: |
Description
Instructions to replicate the problem:
- Start OMEdit and create a new model
Test. - Add the following lines of code:
model Test Integer N = 2; Real x[N](each fixed = true); equation for i in 1:N loop der(x[i]) = -x[i]; end for; annotation(Icon(coordinateSystem(initialScale = 1)), Diagram); end Test; - Save the model
- Simulate the model: the compiler correctly complains that dimensions must be parameter or constant expression (in N)
- add the
parameterkeyword before Integer - Simulate the model: the following message appears:
Duplicate elements (due to inherited elements) not identical: first element is: Integer N = 2 second element is: parameter Integer N = 2
Note that if you hit Save, the .mo file does not contain any duplicate lines - they only exist in the library loaded in memory. If I unload and reload the model, it compiles correctly.
Change History (4)
comment:1 by , 10 years ago
| Component: | *unknown* → OMEdit |
|---|---|
| Owner: | changed from to |
| Status: | new → accepted |
comment:2 by , 10 years ago
| Resolution: | → fixed |
|---|---|
| Status: | accepted → closed |
Note:
See TracTickets
for help on using tickets.

Fixed in 53f6bfc/OMEdit.