#3255 closed defect (fixed)
getComponentAnnotations should merge the constrainedby annotation with the component annotation
Reported by: | adeas31 | Owned by: | adrpo |
---|---|---|---|
Priority: | high | Milestone: | 1.9.4 |
Component: | Parser | Version: | trunk |
Keywords: | Cc: | sjoelund.se |
Description
getComponentAnnotations returns empty annotation for the component if constrainedby is used.
Attachments (2)
Change History (10)
Changed 9 years ago by adeas31
Changed 9 years ago by adeas31
comment:1 Changed 9 years ago by adrpo
- Cc sjoelund.se added
- Component changed from Interactive Environment to Parser
comment:2 Changed 9 years ago by adrpo
Seems that Modelica allows you to write:
replaceable T1 a[2] annotation(1), b[3] annotation(2), c[4] annotation(3) constrainedby T2 annotation(4);
which is a bit weird as constrainedby T2 should be applied to all the components.
comment:3 Changed 9 years ago by adrpo
I opened a ticket on MA: m:#1689 and we'll see where that gets us.
comment:4 Changed 9 years ago by adrpo
- Summary changed from getComponentAnnotations fails when constrainedby is used to getComponentAnnotations should merge the constrainedby annotation with the component annotation
comment:5 Changed 9 years ago by adrpo
This ticket might also apply for short class definitions:
redeclare T = T1 annotation(1) constrainedby T2 annotation(2);
comment:6 Changed 9 years ago by adrpo
- Resolution set to fixed
- Status changed from new to closed
Fixed in r25478 for components. Reopen if we need it also for short class definitions.
comment:7 Changed 8 years ago by dietmarw
- Milestone changed from Future to pre1.9.4
It doesn't make sense to keep closed ticket in the "Future" milestone that were simply forgotten to assign to the correct milestone in the past.
comment:8 Changed 6 years ago by sjoelund.se
- Milestone changed from pre1.9.4 to 1.9.4
Removing the pre1.9.4 milestone in favor of 1.9.4.
Hmm, there seems to be an issue with the way we parse Modelica grammar here:
Seems that the annotation end up as the comment for the constrainedby clause.