-
-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use values from the first module when unifying modules.
Fixes #736
- Loading branch information
1 parent
4c63e77
commit 48bd126
Showing
2 changed files
with
51 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
module Main { | ||
fun message() : String { | ||
"Hello, world!" | ||
} | ||
} | ||
|
||
component Main { | ||
fun render : Html { | ||
<div>"#{Main.message()}"</div> | ||
} | ||
} | ||
-------------------------------------------------------------------------------- | ||
░ ERROR (GLOBAL_NAME_CONFLICT) ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | ||
|
||
There is already a module with the name: Main | ||
|
||
You are trying to define something with the same name here: | ||
|
||
┌ errors/global_name_conflict:7:1 | ||
├─────────────────────────────────── | ||
3│ "Hello, world!" | ||
4│ } | ||
5│ } | ||
6│ | ||
│ ⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄ | ||
7│ component Main { | ||
8│ fun render : Html { | ||
9│ <div>"#{Main.message()}"</div> | ||
10│ } | ||
11│ } | ||
│ ⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃ | ||
|
||
The module is defined here: | ||
|
||
┌ errors/global_name_conflict:1:1 | ||
├─────────────────────────────────── | ||
│ ⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄ | ||
1│ module Main { | ||
2│ fun message() : String { | ||
3│ "Hello, world!" | ||
4│ } | ||
5│ } | ||
│ ⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃ | ||
6│ | ||
7│ component Main { | ||
8│ fun render : Html { | ||
9│ <div>"#{Main.message()}"</div> |
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