Skip to content

Commit 58e7c6a

Browse files
Settle elixir_errors:parse_error/6 InputString as charlist (#11345)
1 parent dec2733 commit 58e7c6a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/elixir/src/elixir_errors.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ snippet(InputString, Location, StartLine, StartColumn) ->
9696
end.
9797

9898
-spec parse_error(elixir:keyword(), binary() | {binary(), binary()},
99-
binary(), binary(), {list(), integer(), integer()}) -> no_return().
100-
parse_error(Location, File, Error, <<>>, {InputString, StartLine, StartColumn}) ->
99+
binary(), binary(), {unicode:charlist(), integer(), integer()}) -> no_return().
100+
parse_error(Location, File, Error, <<>>, {InputString, StartLine, StartColumn}) when is_list(InputString) ->
101101
Message = case Error of
102102
<<"syntax error before: ">> -> <<"syntax error: expression is incomplete">>;
103103
_ -> <<Error/binary>>

lib/iex/lib/iex/evaluator.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ defmodule IEx.Evaluator do
7474
opts[:file],
7575
"incomplete expression",
7676
"",
77-
{"", Keyword.get(opts, :line, 1), Keyword.get(opts, :column, 1)}
77+
{'', Keyword.get(opts, :line, 1), Keyword.get(opts, :column, 1)}
7878
)
7979
end
8080

@@ -103,7 +103,7 @@ defmodule IEx.Evaluator do
103103
file,
104104
error,
105105
token,
106-
{input, line, column}
106+
{charlist, line, column}
107107
)
108108
end
109109
end

0 commit comments

Comments
 (0)