diff options
author | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2003-05-14 09:48:39 +0000 |
---|---|---|
committer | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2003-05-14 09:48:39 +0000 |
commit | 3712db9d8700fdb8c25d9c97fa4692cf90ab83f9 (patch) | |
tree | 6777ae344b366e48c124e4f80e24f56fcc170d57 | |
parent | 3b1652c76c6f5b2aee2ff691583e59fc2c31b1a8 (diff) |
additions
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5564 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | testlabl/multimatch.ml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/testlabl/multimatch.ml b/testlabl/multimatch.ml index 60ac92216..050572b27 100644 --- a/testlabl/multimatch.ml +++ b/testlabl/multimatch.ml @@ -15,6 +15,13 @@ module M : sig [< `A & 'a = int & 'b = float | `B & 'b =string & 'a = int] -> 'a * 'b end = struct let f = f end;; +(* Should be good! *) +module M : sig + val f : + [< `A & 'a = int * float | `B & 'a = bool * string] -> 'a +end = struct let f = f end;; + +let f = multifun `A|`B as x -> f x;; (* Two-level example *) let f = multifun @@ -59,7 +66,7 @@ module M : sig val f : [< `A & 'b = int list ref | `B & 'b = 'c list ref] -> 'b end = struct let f = f end;; (* Still OK *) -let l : int list = r;; +let l : int list ref = r;; module M : sig val f : [< `A & 'b = int list ref | `B & 'b = 'c list ref] -> 'b end = struct let f = f end;; |