jeremyjh / dialyxir

Mix tasks to simplify use of Dialyzer in Elixir projects.
Apache License 2.0
1.7k stars 140 forks source link

Failed to parse warning: [<: 1, >: 1] #504

Open srevenant opened 1 year ago

srevenant commented 1 year ago

I figured out the "problem" — in a library module we have a function defined as a callback with a default function which has 'defoverride: ...' defined for this function.

Then in the module using this library, it overrides that function, but the function head had an optional argument defined:

def build(params \\ %{}) do

Taking out the \\ %{} resolved the error.

Environment

Elixir 1.14.1 (compiled with Erlang/OTP 25)

Current behavior

Please file a bug in https://github.com/jeremyjh/dialyxir/issues with this message.

Failed to parse warning:
[<: 1, >: 1]

Legacy warning:
lib/rivet/ecto/collection/model.ex:54: The pattern <> can never match since previous clauses completely covered the type <>