Skip to content

Commit 3fb82c3

Browse files
sabiwarajosevalim
andauthored
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 555eac7 commit 3fb82c3

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
@@ -2082,8 +2082,9 @@ defmodule Kernel do
20822082
defp invalid_concat_left_argument_error(arg) do
20832083
:erlang.error(
20842084
ArgumentError.exception(
2085-
"the left argument of <> operator inside a match should always be a literal " <>
2086-
"binary because its size can't be verified. Got: #{arg}"
2085+
"cannot perform prefix match because the left operand of <> has unknown size. " <>
2086+
"The left operand of <> inside a match should either be a literal binary or " <>
2087+
"an existing variable with the pin operator (such as ^some_var). Got: #{arg}"
20872088
)
20882089
)
20892090
end

0 commit comments

Comments
 (0)