[erlang-questions] Lack of warning for overlapping clauses with
Attila Rajmund Nohl
Wed Jul 21 11:48:13 CEST 2010
2010/7/21, Torben Hoffmann <>:
> On Tue, Jul 20, 2010 at 23:53, Richard O'Keefe <> wrote:
>> So nhc98 was completely silent, and ghc 6.6.1 did notice the
>> explicit pattern duplication but did *NOT* notice the duplication
>> of a pattern in a guard, any more than Erlang did.
> I stand corrected! Thanks for putting my assumptions to a timely death!!
I think there's one more thing: Erlang function clauses overlap all
the time. It's a common pattern that:
f(1) -> ok;
f(2) -> ok;
f(_) -> not_ok.
and obviously the third pattern overlaps with the first two, but we
really don't want a warning for that.
More information about the erlang-questions