﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
3698	Comment preserving parsing/unparsing creates hidden duplicate declarations	Francesco Casella	Adeel Asghar	"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 {{{parameter}}} keyword 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.
"	defect	closed	blocker	1.9.4	OMEdit	v1.9.4-dev-nightly	fixed		
