File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed
tests/test-dirs/type-enclosing Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,11 @@ let from_reconstructed ~nodes ~cursor ~verbosity exprs =
102102 let ppf, to_string = Format. to_string () in
103103 Type_utils. print_constr ~verbosity env ppf cd;
104104 Some (loc, String (to_string () ), `No )
105+ | Some (Context. Label { lbl_name; lbl_arg; _ } ) ->
106+ log ~title: " from_reconstructed" " ctx: label %s" lbl_name;
107+ let ppf, to_string = Format. to_string () in
108+ Type_utils. print_type_with_decl ~verbosity env ppf lbl_arg;
109+ Some (loc, String (to_string () ), `No )
105110 | Some Context. Constant -> None
106111 | _ ->
107112 let context = Option. value ~default: Context. Expr context in
Original file line number Diff line number Diff line change @@ -29,10 +29,10 @@ Verbosity 0 should stop at Kind.t
2929 " Kind.t"
3030
3131On `let y = x . k| ind`
32- FIXME Verbosity 1 should show the actual type definition of Kind. t
32+ Verbosity 1 should show the actual type definition of Kind. t
3333 $ $ MERLIN single type-enclosing -position 8 : 11 -verbosity 1 \
3434 > -filename . /main. ml < . /main. ml | tr ' \r\n' ' ' | jq " .value[0].type"
35- " Kind.t "
35+ " type t = A | B "
3636
3737On `let z = { kind = B }. k| ind`
3838Verbosity 0 should stop at Kind. t
@@ -53,7 +53,7 @@ Verbosity 0 should stop at Kind.t
5353 " Kind.t"
5454
5555On `let x = { k| ind = A }`
56- FIXME Verbosity 1 should show the actual type definition of Kind. t
56+ Verbosity 1 should show the actual type definition of Kind. t
5757 $ $ MERLIN single type-enclosing -position 7 : 12 -verbosity 1 \
5858 > -filename . /main. ml < . /main. ml | tr ' \r\n' ' ' | jq " .value[0].type"
59- " Kind.t "
59+ " type t = A | B "
Original file line number Diff line number Diff line change @@ -231,7 +231,7 @@ FIXME: The following results are not entirely satisfying (`foo.Bar -> foo` could
231231 " line" : 12 ,
232232 " col" : 18
233233 },
234- " type" : " unit" ,
234+ " type" : " type unit = () " ,
235235 " tail" : " no"
236236 },
237237 {
You can’t perform that action at this time.
0 commit comments