summaryrefslogtreecommitdiff
path: root/testsuite/tests/typing-misc/records.ml
diff options
context:
space:
mode:
authorJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2012-06-13 23:45:01 +0000
committerJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2012-06-13 23:45:01 +0000
commitd683e249caa35ae2736669405882771a72b68e50 (patch)
tree999b5a559beec7d0fb1e20bba27b803f97963d5e /testsuite/tests/typing-misc/records.ml
parent50abdb66a375ea14f8e18e46ddb54f5a01bea702 (diff)
downloadocaml-d683e249caa35ae2736669405882771a72b68e50.tar.gz
Fix PR#5073: Wrong location for 'Unbound record field label' error
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12605 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'testsuite/tests/typing-misc/records.ml')
-rw-r--r--testsuite/tests/typing-misc/records.ml12
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/typing-misc/records.ml b/testsuite/tests/typing-misc/records.ml
new file mode 100644
index 0000000000..36fa5ec782
--- /dev/null
+++ b/testsuite/tests/typing-misc/records.ml
@@ -0,0 +1,12 @@
+(* undefined labels *)
+type t = {x:int;y:int};;
+{x=3;z=2};;
+fun {x=3;z=2} -> ();;
+
+(* mixed labels *)
+{x=3; contents=2};;
+
+(* private types *)
+type u = private {mutable u:int};;
+{u=3};;
+fun x -> x.u <- 3;;