#6180 closed defect (fixed)
Nested records which seek to assign values between each other now fail to compile
Reported by: | Owned by: | somebody | |
---|---|---|---|
Priority: | high | Milestone: | 1.16.0 |
Component: | Frontend | Version: | v1.16.0-dev |
Keywords: | Cc: |
Description (last modified by )
Sample code follows below. This code compiles in previous releases of OMC.
model DebugI record InnerA Integer c = 2; end InnerA; record InnerB Integer c; end InnerB; record BaseRecord InnerA inner_a; Integer d = inner_a.c; //...this works InnerB inner_b (c = inner_a.c); //...this fails to compile end BaseRecord; BaseRecord base; end DebugI;
Change History (8)
follow-up: 3 comment:1 by , 4 years ago
Description: | modified (diff) |
---|
follow-up: 4 comment:2 by , 4 years ago
@craig.fletcher, are you using the new front end (default from OMEdit, needs -d=newInst
from scripts)?
comment:3 by , 4 years ago
Replying to perost:
I'm afraid I can't replicate the issue, the model compiles and simulates without any errors for me. Can you be more specific on what goes wrong?
I'll re-confirm the code and come back to you with details.
follow-up: 5 comment:4 by , 4 years ago
Replying to casella:
@craig.fletcher, are you using the new front end (default from OMEdit, needs
-d=newInst
from scripts)?
No, compiling from the command line. (Linux)
comment:5 by , 4 years ago
Replying to anonymous:
Replying to casella:
@craig.fletcher, are you using the new front end (default from OMEdit, needs
-d=newInst
from scripts)?
No, compiling from the command line. (Linux)
Then you need to add the -d=newInst
flag to use the new frontend, the old one has some issues with record constructors in this case. The new frontend will be the default also on the command line in the next major release.
comment:6 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
We've confirmed here that building with the -d=newInst switch works fine. Thanks all!
comment:7 by , 4 years ago
Component: | *unknown* → Frontend |
---|
comment:8 by , 4 years ago
Milestone: | 1.16.1 → 1.16.0 |
---|
I'm afraid I can't replicate the issue, the model compiles and simulates without any errors for me. Can you be more specific on what goes wrong?