[erlang-questions] What is wrong with this list?
Ulf Wiger (TN/EAB)
Wed Sep 5 10:46:39 CEST 2007
> This is a case where the line number information could be
> useful. Also a warning might be useful during compilation
> time, a same kind of warning that you get in C for code like
> if (a=b) ...
The compiler does issue warnings whenever it can detect
that a clause will not match.
[java|python] = [1,2,3,4,5].
results in this warning:
./warns.erl:6: Warning: no clause will ever match
The initial post in this thread showed a failed
pattern match in the _shell_. That code would
have triggered a warning if compiled.
More information about the erlang-questions