Skip to content

Commit ef3e279

Browse files
sabiwarajosevalim
andcommitted
Update argument error message when matching with <> (#13325)
* Update argument error message when matching with <> * Update lib/elixir/lib/kernel.ex Co-authored-by: José Valim <[email protected]> --------- Co-authored-by: José Valim <[email protected]>
1 parent d8cc841 commit ef3e279

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/elixir/lib/kernel.ex

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2076,8 +2076,9 @@ defmodule Kernel do
20762076
defp invalid_concat_left_argument_error(arg) do
20772077
:erlang.error(
20782078
ArgumentError.exception(
2079-
"the left argument of <> operator inside a match should always be a literal " <>
2080-
"binary because its size can't be verified. Got: #{arg}"
2079+
"cannot perform prefix match because the left operand of <> has unknown size. " <>
2080+
"The left operand of <> inside a match should either be a literal binary or " <>
2081+
"an existing variable with the pin operator (such as ^some_var). Got: #{arg}"
20812082
)
20822083
)
20832084
end

0 commit comments

Comments
 (0)