File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed
ocaml/testsuite/tests/typing-layouts Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change 722
722
723
723
let x = (module C : S with type t = 'a )
724
724
725
- (* This should be accepted *)
726
725
[%% expect{|
727
726
module type S = sig type t : any end
728
727
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 >
738
729
| }]
You can’t perform that action at this time.
0 commit comments