Opened 7 years ago

Closed 6 years ago

#4875 closed defect (fixed)

Duplication of clases creates weird Modelica code

Reported by: Christian Kral <dr.christian.kral@…> Owned by: Adeel Asghar
Priority: high Milestone: 1.14.0
Component: OMEdit Version:
Keywords: Cc:

Description

Create any Modelica class, e.g., the model:

model Test
  constant Real one=1;
equation
end Test;

Save the Modelica class as "Test.mo". Make a right click on Test -> Duplicate and select.

Name: Test
Path: Test

This creates model Test within Test. One can do this with other Modelica classes as well. If applied to a package, the outcome is legal Modelica code but it seems very much not to be legal to create any class with any class. So the application of Duplicate on any Modelica shall not be allowed.

Note: The effect described in this ticket is very likely to be a problem to beginners. I recently noticed that this something my students stumble into, when working with the duplication of models.

Change History (2)

comment:1 by Francesco Casella, 6 years ago

Milestone: 1.13.01.14.0

Rescheduled to 1.14.0 after 1.13.0 releasee

comment:2 by Adeel Asghar, 6 years ago

Resolution: fixed
Status: newclosed

Fixed in ed41047/OMEdit.

Note: See TracTickets for help on using tickets.