elixir-pipes icon indicating copy to clipboard operation
elixir-pipes copied to clipboard

Warning: this clause cannot match because a previous clause at line X always matches

Open fourcube opened this issue 10 years ago • 1 comments

Thank you for this great library. I have one question:

pipe_matching x, {:ok, x},
      {:ok, source_dir}
      |> build
      |> tag(name, version)
      |> save(dest_dir)
      |> delete_image

leads to this compiler warning:

warning: this clause cannot match because a previous clause at line 1 always matches

Am I doing something wrong or do I simply have to live with this warning?

fourcube avatar Dec 18 '15 07:12 fourcube

Hm... this didn't happen with my previous examples. (That's the perfect use case, and exactly why I built it. :) )

-bt

On Fri, Dec 18, 2015 at 1:26 AM, Chris Grieger [email protected] wrote:

Thank you for this great library. I have one question:

pipe_matching x, {:ok, x}, {:ok, source_dir} |> build |> tag(name, version) |> save(dest_dir) |> delete_image

leads to this compiler warning:

warning: this clause cannot match because a previous clause at line 1 always matches

Am I doing something wrong or do I simply have to live with this warning?

— Reply to this email directly or view it on GitHub https://github.com/batate/elixir-pipes/issues/13.

Bruce Tate | CTO | 512.772.4312

i__can__make__it__better_.com_ http://icanmakeitbetter.com

Innovation + Research. Made Simple

batate avatar Dec 18 '15 14:12 batate