Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

illegal pattern #7

Open
OvermindDL1 opened this issue Aug 25, 2016 · 2 comments
Open

illegal pattern #7

OvermindDL1 opened this issue Aug 25, 2016 · 2 comments

Comments

@OvermindDL1
Copy link
Contributor

OvermindDL1 commented Aug 25, 2016

Given this reduced test:

IO.inspect({:ok, str} when is_binary(str) = get_a_string_or_whatever())

It gives an 'illegal pattern' error at compile-time of:

 ** (CompileError) web/controllers/index_controller.ex:8: illegal pattern
    (stdlib) lists.erl:1338: :lists.foreach/2
    (stdlib) erl_eval.erl:670: :erl_eval.do_apply/6
    (elixir) lib/kernel/parallel_compiler.ex:116: anonymous fn/4 in Kernel.ParallelCompiler.spawn_compilers/1
@OvermindDL1
Copy link
Contributor Author

Unsure how fixable this one is, but normal matching without the 'when' works.

@OvermindDL1
Copy link
Contributor Author

OvermindDL1 commented Aug 25, 2016

Probably should be ignored now that I'm thinking of it, I'd say only top-level ones should be watched for perhaps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant