You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When writing a @type declaration, I sometimes reference specific objects when I know they're guaranteed, like :ok, or ModuleName. But with @type! (and not@spec! for some reason) this causes a dialyxir error, saying the type name is a function with no return:
lib/service/discord.ex:76:no_return
Function logger_state/0 has no local return.
Even though when executing the code, it runs fine.
This also means some built-in types like Keyword.t() always cause errors, because they reference specific objects.
Erlang/OTP 25 [erts-13.2.2.3] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [jit:ns]
Elixir 1.15.5 (compiled with Erlang/OTP 25)
Dialyxir 1.4.1
Type Check v0.13.5
The text was updated successfully, but these errors were encountered:
When writing a
@type
declaration, I sometimes reference specific objects when I know they're guaranteed, like:ok
, orModuleName
. But with@type!
(and not@spec!
for some reason) this causes a dialyxir error, saying the type name is a function with no return:Even though when executing the code, it runs fine.
This also means some built-in types like
Keyword.t()
always cause errors, because they reference specific objects.The text was updated successfully, but these errors were encountered: