summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2005-03-14 00:48:43 +0000
committerJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2005-03-14 00:48:43 +0000
commitb95dc98e0e6b9ed6987684755e338cb1b7e6e09c (patch)
tree8f3e33ee05f351928406fee5d649bdd5c892d7d7
parent58c2c48ac786ca1de5c8acb5d068f564420bfa62 (diff)
more examples
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6815 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--testlabl/fixedtypes.ml13
1 files changed, 13 insertions, 0 deletions
diff --git a/testlabl/fixedtypes.ml b/testlabl/fixedtypes.ml
index 54c05f13a..b1896129b 100644
--- a/testlabl/fixedtypes.ml
+++ b/testlabl/fixedtypes.ml
@@ -52,3 +52,16 @@ module M4 = struct
| `Z -> 7
end
module M5 = F(M4)
+
+module M6 : sig
+ type c as < move: int -> unit; x: int; ..>
+ val create : int -> c
+end = struct
+ class c x = object
+ val mutable x : int = x
+ method x = x
+ method move d = x <- x+d
+ end
+ let create = new c
+end
+let f (x : M6.c) = x#move 3; x#x;;