-
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.
Port frontend fixes to 1.23 (#12301)
* Handle too many subscripts in Type.subscript (#12299) - Don't fail in `Type.subscript` if too many subscripts are given and `failOnError=false`. Fixes #12296 * Handle uninstantiated dimension in Dimension.toString (#12300) - Add case for `Dimension.RAW_DIM` in `Dimension.toString`. Fixes #12297
- Loading branch information
Showing
5 changed files
with
60 additions
and
0 deletions.
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/BuiltinAttribute24.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: BuiltinAttribute23 | ||
// keywords: | ||
// status: incorrect | ||
// cflags: -d=newInst | ||
// | ||
|
||
model BuiltinAttribute24 | ||
Real x[2,2](start = {3,1}); | ||
end BuiltinAttribute24; | ||
|
||
// Result: | ||
// Error processing file: BuiltinAttribute24.mo | ||
// [flattening/modelica/scodeinst/BuiltinAttribute24.mo:8:15-8:28:writable] Notification: From here: | ||
// [flattening/modelica/scodeinst/BuiltinAttribute24.mo:8:3-8:29:writable] Error: Type mismatch in binding 'start = {3.0, 1.0}', expected array dimensions [2, 2], got [2]. | ||
// | ||
// # Error encountered! Exiting... | ||
// # Please check the error message and the flags. | ||
// | ||
// Execution failed! | ||
// endResult |
32 changes: 32 additions & 0 deletions
32
testsuite/flattening/modelica/scodeinst/DuplicateElements11.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,32 @@ | ||
// name: DuplicateElements11 | ||
// keywords: | ||
// status: incorrect | ||
// cflags: -d=newInst | ||
// | ||
// | ||
|
||
model A | ||
Real x[3]; | ||
end A; | ||
|
||
model B | ||
Real x[3]; | ||
end B; | ||
|
||
model DuplicateElements11 | ||
extends A(x = {1, 2, 3}); | ||
extends B; | ||
end DuplicateElements11; | ||
|
||
// Result: | ||
// Error processing file: DuplicateElements11.mo | ||
// [flattening/modelica/scodeinst/DuplicateElements11.mo:9:3-9:12:writable] Notification: From here: | ||
// [flattening/modelica/scodeinst/DuplicateElements11.mo:13:3-13:12:writable] Error: Duplicate elements (due to inherited elements) not identical: | ||
// first element is: Real[3] x = {1, 2, 3} | ||
// second element is: Real[3] x | ||
// | ||
// # Error encountered! Exiting... | ||
// # Please check the error message and the flags. | ||
// | ||
// Execution failed! | ||
// 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