Skip to content

Commit 38fe3a8

Browse files
ptdeweylpil
authored andcommitted
fix: update compiler error message for echoing non-gleam atoms
1 parent 45c770c commit 38fe3a8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

compiler-core/templates/echo.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ inspect@atom(Atom) ->
9494
Binary = erlang:atom_to_binary(Atom),
9595
case inspect@maybe_gleam_atom(Binary, none, <<>>) of
9696
{ok, Inspected} -> Inspected;
97-
{error, _} -> ["atom.create_from_string(\"", Binary, "\")"]
97+
{error, _} -> ["atom.create(\"", Binary, "\")"]
9898
end.
9999

100100
inspect@list(List) ->

test-output/src/tests/snapshots/test_output__tests__echo__erlang-echo_non_record_atom_tag.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ pub fn to_atom(string: String) -> Atom
1717

1818
--- gleam run output ----------------
1919
src/main.gleam:2
20-
#(atom.create_from_string("UP"), 1, 2)
20+
#(atom.create("UP"), 1, 2)
2121
src/main.gleam:3
2222
Down(12.34)
2323
src/main.gleam:4
24-
#(atom.create_from_string("Both"), "ok")
24+
#(atom.create("Both"), "ok")

0 commit comments

Comments
 (0)