Skip to content

Commit fdd6ef8

Browse files
committed
Also mention pattern matching on hint
1 parent 9354149 commit fdd6ef8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/elixir/lib/module/types.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ defmodule Module.Types do
421421

422422
defp format_message_hint({:sized_and_unsize_tuples, {size, var}}) do
423423
"""
424-
HINT: use "is_tuple(#{Macro.to_string(var)}) and \
424+
HINT: use pattern matching or "is_tuple(#{Macro.to_string(var)}) and \
425425
tuple_size(#{Macro.to_string(var)}) == #{size}" to guard a sized tuple.
426426
"""
427427
end

lib/elixir/test/elixir/module/types/types_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ defmodule Module.Types.TypesTest do
344344
# types_test.ex:1
345345
{_} = foo
346346
347-
HINT: use "is_tuple(foo) and tuple_size(foo) == 1" to guard a sized tuple.
347+
HINT: use pattern matching or "is_tuple(foo) and tuple_size(foo) == 1" to guard a sized tuple.
348348
"""
349349
end
350350

0 commit comments

Comments
 (0)