Browse thread
is this a bug ?
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Arne Ehrlich <arne.ehrlich@g...> |
| Subject: | Re: [Caml-list] is this a bug ? |
Am Dienstag, 9. Mai 2006 15:09 schrieb Christophe Raffalli: > hello, > > -------------------------------- > let f b l = match l with > [] | [_] -> 1 > > | [a;_] | [_;a] when a = b-> 2 > | _ -> 3 > > let _ = > print_int (f 1 [1;2]); > print_int (f 1 [2;1]); > print_newline () > -------------------------------- > > Do you think this code should have a useless pattern warning and print "23" > instead of "22" ? You found an semantic problem in the gramar ^^ or-patterns do not play well with "when" I think it's a bug in the semantics...