Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the self reference check in Lookup recursive (#8535)
Fixes #8521
- Loading branch information
Showing
3 changed files
with
44 additions
and
2 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
22 changes: 22 additions & 0 deletions
22
testsuite/flattening/modelica/scodeinst/RecursiveExtends4.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,22 @@ | ||
// name: RecursiveExtends4 | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
// Checks that the compiler catches recursive extends. | ||
// | ||
|
||
model RecursiveExtends4 | ||
extends RecursiveExtends4.A.Icon1; | ||
|
||
model A | ||
extends RecursiveExtends4.A.Icon1; | ||
|
||
partial class Icon1 end Icon1; | ||
end A; | ||
end RecursiveExtends4; | ||
|
||
// Result: | ||
// class RecursiveExtends4 | ||
// end RecursiveExtends4; | ||
// endResult |