diff options
Diffstat (limited to 'testsuite/tests/typing-misc/pr6939.ml-flat')
-rw-r--r-- | testsuite/tests/typing-misc/pr6939.ml-flat | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/typing-misc/pr6939.ml-flat b/testsuite/tests/typing-misc/pr6939.ml-flat new file mode 100644 index 0000000000..2acdd12ea7 --- /dev/null +++ b/testsuite/tests/typing-misc/pr6939.ml-flat @@ -0,0 +1,15 @@ +let rec x = [| x |]; 1.;; +[%%expect{| +Line _, characters 12-19: +Warning 10: this expression should have type unit. +Line _, characters 12-23: +Error: This kind of expression is not allowed as right-hand side of `let rec' +|}];; + +let rec x = let u = [|y|] in 10. and y = 1.;; +[%%expect{| +Line _, characters 16-17: +Warning 26: unused variable u. +Line _, characters 12-32: +Error: This kind of expression is not allowed as right-hand side of `let rec' +|}];; |