Testsuite: error messages when calling #use in the toplevel

master
Armaël Guéneau 2018-07-23 14:22:35 +02:00 committed by Thomas Refis
parent 1be47bf7ab
commit 2e9392549e
6 changed files with 34 additions and 1 deletions

View File

@ -1,4 +1,4 @@
Characters 34-41:
Characters 197-204:
let x = (1 + 2) +. 3. in ();;
^^^^^^^
Error: This expression has type int but an expression was expected of type
@ -27,4 +27,18 @@ Characters 9-18:
2)...
Error: This expression has type int but an expression was expected of type
float
File "error_highlighting_use1.ml", line 1, characters 8-15:
Error: This expression has type int but an expression was expected of type
float
File "error_highlighting_use2.ml", line 1, characters 15-17:
Error: Syntax error: ')' expected
File "error_highlighting_use2.ml", line 1, characters 8-9:
Error: This '(' might be unmatched
File "error_highlighting_use3.ml", line 3, characters 2-4:
Error: Syntax error: ')' expected
File "error_highlighting_use3.ml", line 1, characters 8-9:
Error: This '(' might be unmatched
File "error_highlighting_use4.ml", line 1, characters 8-17:
Error: This expression has type int but an expression was expected of type
float

View File

@ -1,4 +1,8 @@
(* TEST
files = "error_highlighting_use1.ml \
error_highlighting_use2.ml \
error_highlighting_use3.ml \
error_highlighting_use4.ml"
* toplevel
*)
@ -21,3 +25,8 @@ let x = (1
+
2) +.
3. in ();;
#use "error_highlighting_use1.ml";;
#use "error_highlighting_use2.ml";;
#use "error_highlighting_use3.ml";;
#use "error_highlighting_use4.ml";;

View File

@ -0,0 +1 @@
let x = (1 + 2) +. 3. in ();;

View File

@ -0,0 +1 @@
let x = (1 + 2 in ();;

View File

@ -0,0 +1,4 @@
let x = (1
+
2 in
();;

View File

@ -0,0 +1,4 @@
let x = (1
+
2) +.
3. in ();;