-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Given this reduced test:
{:ok, str} when is_binary(str) = tuple when is_tuple(tuple) = get_a_string_or_whatever()
It gives a compile-time error of:
** (FunctionClauseError) no function clause matching in Happy.HappyPath.happy_match_eq/1
(happy) lib/happy/happy_path.ex:164: Happy.HappyPath.happy_match_eq({:when, [line: 8], [{:=, [line: 8], [{:is_binary, [line: 8], [{:str, [line: 8], nil}]}, {:tuple, [line: 8], nil}]}, {:=, [line: 8], [{:is_tuple, [line: 8], [{:tuple, [line: 8], nil}]}, {:get_a_string_or_whatever, [line: 8], []}]}]})
(happy) lib/happy/happy_path.ex:145: Happy.HappyPath.happy_match/1
(happy) lib/happy/happy_path.ex:112: Happy.HappyPath.happy_match?/1
(elixir) lib/enum.ex:2511: Enum.do_any?/2
(happy) lib/happy/happy_path.ex:88: Happy.HappyPath.make_happy/2
(happy) expanding macro: Happy.happy_path!/2
(my_server) web/controllers/index_controller.ex:7: MyServer.IndexController.index/2
(elixir) lib/kernel/parallel_compiler.ex:116: anonymous fn/4 in Kernel.ParallelCompiler.spawn_compilers/1
Metadata
Metadata
Assignees
Labels
No labels