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
{{ message }}
Repository navigation
Typechecker no warn redundant case clause after %_{} #15635
Elixir 1.21.0-dev (34abdd4) (compiled with Erlang/OTP 29)
Operating system
any
Current behavior
Typechecker not warns on redundant case clauses after %_{}:
casexdo%_{}->:any# but this ok (warns): v when is_struct(v) -> :any%URI{}->:uriend
No warn during compilation.
Same for field-constrained and nested/composite variants:
%_{path: _}{:ok,%_{}}
Expected behavior
Compiler should report
warning: the following clause is redundant:
%URI{} ->
previous clauses have already matched on the following types:
%{..., __struct__: atom()}
type warning found at:
│
6 │ %URI{} -> :uri
Activity
Ensure %_{} is precise in guards, closes #15635
Mark type-check macro expansions as generated (#15888)