Skip to content

Commit 50714db

Browse files
committed
new test now passes, as expected
1 parent 8d6f60b commit 50714db

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

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

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -722,17 +722,8 @@ end
722722

723723
let x = (module C : S with type t = 'a)
724724

725-
(* This should be accepted *)
726725
[%%expect{|
727726
module type S = sig type t : any end
728727
module C : S
729-
Line 9, characters 8-39:
730-
9 | let x = (module C : S with type t = 'a)
731-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
732-
Error: This expression has type (module S with type t = C.t)
733-
but an expression was expected of type (module S with type t = 'a)
734-
The layout of C.t is any, because
735-
of the definition of t at line 2, characters 2-14.
736-
But the layout of C.t must be a sublayout of value, because
737-
it's a type declaration in a first-class module.
728+
val x : (module S with type t = C.t) = <module>
738729
|}]

0 commit comments

Comments
 (0)