Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Handle classes extended from builtin types better.
- Loading branch information
Showing
3 changed files
with
59 additions
and
4 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
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,34 @@ | ||
// name: TypeExtends2 | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
|
||
type TypeInteger | ||
extends Integer; | ||
end TypeInteger; | ||
|
||
type TypeInteger2 | ||
extends TypeInteger; | ||
end TypeInteger2; | ||
|
||
type Color = TypeInteger2[3](each min = 0, each max = 255); | ||
|
||
model TypeExtends2 | ||
Color color = {0, 0, 0}; | ||
Integer icolor[3] = color; | ||
end TypeExtends2; | ||
|
||
// Result: | ||
// class TypeExtends2 | ||
// Integer color[1](min = 0, max = 255); | ||
// Integer color[2](min = 0, max = 255); | ||
// Integer color[3](min = 0, max = 255); | ||
// Integer icolor[1]; | ||
// Integer icolor[2]; | ||
// Integer icolor[3]; | ||
// equation | ||
// color = {0, 0, 0}; | ||
// icolor = color; | ||
// end TypeExtends2; | ||
// endResult |