-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Description
Elixir and Erlang/OTP versions
Erlang/OTP 27 [erts-15.2] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit:ns]
Elixir 1.18.2 (compiled with Erlang/OTP 25)
Operating system
fedora
Current behavior
Compile error with while calling a function in a macro that has 2 different return types. That is implemented in a behaviour in different module that uses the module. While the module itself only has 1 of the 2 possible return types implemented.
I made a very simple example repo where to reproduce you just have to call compile on it with elixir 1.18
https://github.com/nulian/simpel_case
warning: the following clause will never match:
:ok
because it attempts to match on the result of:
do_process_event(name, state)
which has type:
dynamic({:ok, term()})
typing violation found at:
│
18 │ :ok ->
│ ~~~~~~
│
└─ lib/simpel_case.ex:18: SimpelCase.Logger.process_event/2
Expected behavior
I expect to be no compile warning or an ability to be able to disable the incorrect typing violation.
Metadata
Metadata
Assignees
Labels
No labels