-
-
Notifications
You must be signed in to change notification settings - Fork 753
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename echo functions to avoid conflicts with modules
- Loading branch information
1 parent
6ec97f2
commit be177a1
Showing
3 changed files
with
61 additions
and
17 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
...javascript/tests/snapshots/gleam_core__javascript__tests__echo__module_named_inspect.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,28 @@ | ||
--- | ||
source: compiler-core/src/javascript/tests/echo.rs | ||
expression: "\nimport other/inspect\n\npub fn main() {\n echo inspect.x\n}\n" | ||
--- | ||
----- SOURCE CODE | ||
|
||
import other/inspect | ||
|
||
pub fn main() { | ||
echo inspect.x | ||
} | ||
|
||
|
||
----- COMPILED JAVASCRIPT | ||
import * as $stdlib$dict from "../../gleam_stdlib/dict.mjs"; | ||
import * as $inspect from "../../other/other/inspect.mjs"; | ||
import { | ||
BitArray as $BitArray, | ||
List as $List, | ||
UtfCodepoint as $UtfCodepoint, | ||
CustomType as $CustomType, | ||
} from "../gleam.mjs"; | ||
|
||
export function main() { | ||
return echo($inspect.x); | ||
} | ||
|
||
// ...omitted code from `templates/echo.mjs`... |
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
16 changes: 16 additions & 0 deletions
16
...src/snapshots/test_echo_output__generated_tests__echo_importing_module_named_inspect.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,16 @@ | ||
--- | ||
source: test-echo-output/src/generated_tests.rs | ||
expression: "./cases/echo_importing_module_named_inspect" | ||
--- | ||
--- CODE | ||
import inspect | ||
|
||
pub fn main() { | ||
echo inspect.x | ||
} | ||
|
||
--- OUTPUT ON ERLANG TARGET | ||
Nil | ||
|
||
--- OUTPUT ON JAVASCRIPT TARGET | ||
Nil |