Skip to content

Commit 8868e23

Browse files
committed
Fix test output
1 parent 93b9795 commit 8868e23

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

ocaml/testsuite/tests/typing-layouts/annots.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,9 +393,9 @@ val f : ('a : float64). 'a -> 'a = <fun>
393393
let f : type (a : any). a -> a = fun x -> x
394394
;;
395395
[%%expect {|
396-
Line 1, characters 4-43:
396+
Line 1, characters 24-30:
397397
1 | let f : type (a : any). a -> a = fun x -> x
398-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
398+
^^^^^^
399399
Error: The universal type variable 'a was declared to have
400400
layout any, but was inferred to have a representable layout.
401401
|}]

ocaml/testsuite/tests/typing-layouts/basics.ml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,8 +703,8 @@ end
703703
Line 4, characters 8-9:
704704
4 | let d = f u in
705705
^
706-
Error: Variables bound in a class must have layout value.
707-
d has layout float64, which is not a sublayout of value.
706+
Error: The types of variables bound by a 'let' in a class function
707+
must have layout value. Instead, d's type has layout float64.
708708
|}];;
709709

710710
(* Hits the Cfk_concrete case of Pcf_val *)
@@ -1415,6 +1415,7 @@ Line 1, characters 9-31:
14151415
1 | let () = (assert false : t_any); ()
14161416
^^^^^^^^^^^^^^^^^^^^^^
14171417
Warning 10 [non-unit-statement]: this expression should have type unit.
1418+
14181419
Line 1, characters 10-22:
14191420
1 | let () = (assert false : t_any); ()
14201421
^^^^^^^^^^^^
@@ -1430,6 +1431,7 @@ Line 1, characters 24-46:
14301431
1 | let () = while false do (assert false : t_any); done
14311432
^^^^^^^^^^^^^^^^^^^^^^
14321433
Warning 10 [non-unit-statement]: this expression should have type unit.
1434+
14331435
Line 1, characters 25-37:
14341436
1 | let () = while false do (assert false : t_any); done
14351437
^^^^^^^^^^^^
@@ -1445,6 +1447,7 @@ Line 1, characters 27-49:
14451447
1 | let () = for i = 0 to 0 do (assert false : t_any); done
14461448
^^^^^^^^^^^^^^^^^^^^^^
14471449
Warning 10 [non-unit-statement]: this expression should have type unit.
1450+
14481451
Line 1, characters 28-40:
14491452
1 | let () = for i = 0 to 0 do (assert false : t_any); done
14501453
^^^^^^^^^^^^

ocaml/testsuite/tests/typing-layouts/datatypes.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,11 @@ Error: This expression has type float but an expression was expected of type
290290

291291
(* CR layouts: copy test from datatypes_alpha with float64 when available *)
292292

293+
type t_float64 : float64
293294
type ('a : float64) float64_t
294295

295296
[%%expect {|
297+
type t_float64 : float64
296298
type ('a : float64) float64_t
297299
|}]
298300

0 commit comments

Comments
 (0)