Skip to content

Commit 31818d6

Browse files
author
José Valim
committed
Stop checking for matches once we reach a fun
1 parent c6f9287 commit 31818d6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/elixir/src/elixir_clauses.erl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,9 @@ has_match_tuple({'case', _, _, _}) ->
199199
has_match_tuple({match, _, _, _}) ->
200200
true;
201201

202+
has_match_tuple({'fun', _, { clauses, _ }}) ->
203+
false;
204+
202205
has_match_tuple(H) when is_tuple(H) ->
203206
has_match_tuple(tuple_to_list(H));
204207

0 commit comments

Comments
 (0)