Version française
Home     About     Download     Resources     Contact us    
Browse thread
is this a bug ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Christophe Raffalli <christophe.raffalli@u...>
Subject: is this a bug ?

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" ?

If someone tell me this is a bug then I fill a bug report ...


-- 
Christophe Raffalli
Université de Savoie
Batiment Le Chablais, bureau 21
73376 Le Bourget-du-Lac Cedex

tél: (33) 4 79 75 81 03
fax: (33) 4 79 75 87 42
mail: Christophe.Raffalli@univ-savoie.fr
www: http://www.lama.univ-savoie.fr/~RAFFALLI
---------------------------------------------
IMPORTANT: this mail is signed using PGP/MIME
At least Enigmail/Mozilla, mutt or evolution
can check this signature. The public key is
stored on www.keyserver.net
---------------------------------------------