-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make sure import collisions are reported correctly
- Loading branch information
Showing
19 changed files
with
193 additions
and
26 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
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
4 changes: 4 additions & 0 deletions
4
compiler/test/Blackbox/test-cases/import-collision/Entrypoint.mad
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,4 @@ | ||
import { Something } from "./ModuleA" | ||
import Something from "./ModuleB" | ||
|
||
main = () => {} |
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 @@ | ||
export type Something = Something |
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 @@ | ||
export alias Something = {} |
7 changes: 7 additions & 0 deletions
7
compiler/test/Blackbox/test-cases/import-collision/expected-js
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,7 @@ | ||
╭──▶ compiler/test/Blackbox/test-cases/import-collision/Entrypoint.mad@2:8-2:17 | ||
│ | ||
2 │ import Something from \"./ModuleB\" | ||
• ┬──────── | ||
• ╰╸ The imported name 'Something' is already used | ||
─────╯ | ||
|
7 changes: 7 additions & 0 deletions
7
compiler/test/Blackbox/test-cases/import-collision/expected-llvm
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,7 @@ | ||
╭──▶ compiler/test/Blackbox/test-cases/import-collision/Entrypoint.mad@2:8-2:17 | ||
│ | ||
2 │ import Something from \"./ModuleB\" | ||
• ┬──────── | ||
• ╰╸ The imported name 'Something' is already used | ||
─────╯ | ||
|
5 changes: 5 additions & 0 deletions
5
compiler/test/Blackbox/test-cases/redefined-type/Entrypoint.mad
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,5 @@ | ||
import type { Something } from "./ModuleA" | ||
|
||
alias Something = {} | ||
|
||
main = () => {} |
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 @@ | ||
export type Something = Something |
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,9 @@ | ||
╭──▶ compiler/test/Blackbox/test-cases/redefined-type/Entrypoint.mad@3:1-3:21 | ||
│ | ||
3 │ alias Something = {} | ||
• ┬─────────────────── | ||
• ╰╸ The type 'Something' is already defined | ||
• | ||
│ Hint: Change the name of the type | ||
─────╯ | ||
|
9 changes: 9 additions & 0 deletions
9
compiler/test/Blackbox/test-cases/redefined-type/expected-llvm
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,9 @@ | ||
╭──▶ compiler/test/Blackbox/test-cases/redefined-type/Entrypoint.mad@3:1-3:21 | ||
│ | ||
3 │ alias Something = {} | ||
• ┬─────────────────── | ||
• ╰╸ The type 'Something' is already defined | ||
• | ||
│ Hint: Change the name of the type | ||
─────╯ | ||
|
4 changes: 4 additions & 0 deletions
4
compiler/test/Blackbox/test-cases/type-import-collision/Entrypoint.mad
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,4 @@ | ||
import type { Something } from "./ModuleA" | ||
import type { Something } from "./ModuleB" | ||
|
||
main = () => {} |
1 change: 1 addition & 0 deletions
1
compiler/test/Blackbox/test-cases/type-import-collision/ModuleA.mad
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 @@ | ||
export type Something = Something |
1 change: 1 addition & 0 deletions
1
compiler/test/Blackbox/test-cases/type-import-collision/ModuleB.mad
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 @@ | ||
export alias Something = {} |
7 changes: 7 additions & 0 deletions
7
compiler/test/Blackbox/test-cases/type-import-collision/expected-js
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,7 @@ | ||
╭──▶ compiler/test/Blackbox/test-cases/type-import-collision/Entrypoint.mad@2:15-2:24 | ||
│ | ||
2 │ import type { Something } from \"./ModuleB\" | ||
• ┬──────── | ||
• ╰╸ The imported name 'Something' is already used | ||
─────╯ | ||
|
7 changes: 7 additions & 0 deletions
7
compiler/test/Blackbox/test-cases/type-import-collision/expected-llvm
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,7 @@ | ||
╭──▶ compiler/test/Blackbox/test-cases/type-import-collision/Entrypoint.mad@2:15-2:24 | ||
│ | ||
2 │ import type { Something } from \"./ModuleB\" | ||
• ┬──────── | ||
• ╰╸ The imported name 'Something' is already used | ||
─────╯ | ||
|