-
-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #251 from sinato/feat/type-aliases
feat: type alias
- Loading branch information
Showing
33 changed files
with
552 additions
and
41 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
10 changes: 10 additions & 0 deletions
10
...mun_compiler/src/snapshots/mun_compiler__diagnostics__tests__cyclic_type_alias_error.snap
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,10 @@ | ||
--- | ||
source: crates/mun_compiler/src/diagnostics.rs | ||
expression: "compilation_errors(\"\\n\\ntype Foo = Foo;\")" | ||
--- | ||
error: cyclic type | ||
--> main.mun:3:12 | ||
| | ||
3 | type Foo = Foo; | ||
| ^^^ cyclic type | ||
| |
10 changes: 10 additions & 0 deletions
10
...s/mun_compiler/src/snapshots/mun_compiler__diagnostics__tests__free_type_alias_error.snap
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,10 @@ | ||
--- | ||
source: crates/mun_compiler/src/diagnostics.rs | ||
expression: "compilation_errors(\"\\n\\ntype Foo;\")" | ||
--- | ||
error: free type alias without type ref | ||
--> main.mun:3:1 | ||
| | ||
3 | type Foo; | ||
| ^^^^^^^^^ free type alias without type ref | ||
| |
10 changes: 10 additions & 0 deletions
10
...r/src/snapshots/mun_compiler__diagnostics__tests__type_alias_target_undeclared_error.snap
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,10 @@ | ||
--- | ||
source: crates/mun_compiler/src/diagnostics.rs | ||
expression: "compilation_errors(\"\\n\\ntype Foo = UnknownType;\")" | ||
--- | ||
error: cannot find type `UnknownType` in this scope | ||
--> main.mun:3:12 | ||
| | ||
3 | type Foo = UnknownType; | ||
| ^^^^^^^^^^^ not found in this scope | ||
| |
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
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
Oops, something went wrong.