#6939: add non-regression test.

master
alainfrisch 2015-12-03 16:42:57 +01:00
parent fa743fd605
commit 1c9e418b92
2 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,16 @@
(***********************************************************************)
(* *)
(* OCaml *)
(* *)
(* Alain Frisch, LexiFi *)
(* *)
(* Copyright 2015 Institut National de Recherche en Informatique et *)
(* en Automatique. All rights reserved. This file is distributed *)
(* under the terms of the Q Public License version 1.0. *)
(* *)
(***********************************************************************)
let rec x = [| x |]; 1.;;
let rec x = let u = [|y|] in 10. and y = 1.;;

View File

@ -0,0 +1,18 @@
# Characters 828-835:
let rec x = [| x |]; 1.;;
^^^^^^^
Warning 10: this expression should have type unit.
Characters 828-839:
let rec x = [| x |]; 1.;;
^^^^^^^^^^^
Error: This kind of expression is not allowed as right-hand side of `let rec'
# Characters 17-18:
let rec x = let u = [|y|] in 10. and y = 1.;;
^
Warning 26: unused variable u.
Characters 13-33:
let rec x = let u = [|y|] in 10. and y = 1.;;
^^^^^^^^^^^^^^^^^^^^
Error: This kind of expression is not allowed as right-hand side of `let rec'
#