I’m going through the Mix and OTP tutorial and when I compile the project I see many compilation warnings for what appear to be redundant pattern-match clauses.
$ mix new kv --module KV $ cd kv $ mix compile Compiling 1 file (.ex) Generated kv app warning: this clause cannot match because a previous clause at line 1 always matches lib/list/chars.ex:1 warning: this clause cannot match because a previous clause at line 1 always matches lib/list/chars.ex:1 ... warning: this clause cannot match because a previous clause at line 6 always matches lib/inspect.ex:6
77 warning in total, though many are duplicates. Because I’m new to Elixir, I’d like to understand this before continuing. Specifically, I’m wondering:
- Where (if anywhere) can I find the files it’s complaining about (e.g.
- What (if anything) should I do to address these warnings?
- Is this something I should report an issue for?
The guide lists the following version requirements:
- Elixir 1.9.0 onwards
- Erlang/OTP 20 onwards
I’m using Elixir 1.9.1 and Erlang/OTP 22
Erlang/OTP 22 [erts-10.4.3] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe] Elixir 1.9.1 (compiled with Erlang/OTP 22)
I’m running on NixOS, in case that’s relevant.