%% How come no warnings for functions a .. c.<br>%% I'd expected a warning as in d<br><br>-module(bug).<br>-compile(export_all).<br><br>-define(IS_DIGIT(X),($0=<X andalso X=<$9)).<br><br>a([X|_]) when ?IS_DIGIT(X) -> a;<br>
a("0x" ++ _) -> b.<br><br>b([X|_]) when $0=<X andalso X=<$9 -> a;<br>b("0x" ++ _) -> b.<br><br>c([X|_]) when X == $0 -> a;<br>c("0x" ++ _) -> b.<br> <br>d([$0|_]) -> a;<br>
d("0x" ++ _) -> b.<br> <br> <br>%% erlc bug.erl<br>%% ./bug.erl:16: Warning: this clause cannot match because a previous clause at line 15 always matches<br><br>/Joe<br>