Opened 12 years ago
Last modified 3 years ago
#1939 reopened defect
Duplicate class detection not working when loading MSL
Reported by: | Per Östlund | Owned by: | Per Östlund |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | New Instantiation | Version: | trunk |
Keywords: | Cc: |
Description
Loading a file such as
package Modelica end Modelica;
and loading the MSL at the same time works fine, but it should complain about duplicate classes.
Change History (8)
follow-up: 2 comment:1 by , 6 years ago
Milestone: | Future → 1.13.0 |
---|---|
Resolution: | → worksforme |
Status: | new → closed |
comment:2 by , 6 years ago
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
Replying to casella:
This is fine as long as the semantics of loadFile() is to discard whatever existing class with the same name is already loaded. Should we give a warning in this case?
If you load the file first the model would be found, and the user-defined package would be silently ignored. I think that's quite bad, so we should at least give a warning (possibly an error, duplicate elements is illegal in Modelica after all).
comment:5 by , 5 years ago
Milestone: | 1.14.0 → 1.16.0 |
---|
Releasing 1.14.0 which is stable and has many improvements w.r.t. 1.13.2. This issue is rescheduled to 1.16.0
comment:7 by , 4 years ago
Milestone: | 1.17.0 → 1.18.0 |
---|
Retargeted to 1.18.0 because of 1.17.0 timed release.
Tried to load Modelica.mo with OMEdit after loading the "real" Modelica library, I got an error window.
I tried to run this .mos script
and I got
This is fine as long as the semantics of loadFile() is to discard whatever existing class with the same name is already loaded. Should we give a warning in this case?