-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix scoping of enumeration conversion operators (#11619)
Fixes #11618
- Loading branch information
Showing
4 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
testsuite/flattening/modelica/scodeinst/EnumConversion3.mo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// name: EnumConversion3 | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
|
||
model A | ||
replaceable type AE = enumeration(:); | ||
parameter AE ae = AE(1); | ||
end A; | ||
|
||
model EnumConversion3 | ||
type E = enumeration(one, two, three); | ||
A a(redeclare type AE = E); | ||
end EnumConversion3; | ||
|
||
// Result: | ||
// class EnumConversion3 | ||
// parameter enumeration(one, two, three) a.ae = E.one; | ||
// end EnumConversion3; | ||
// endResult |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters