File tree 3 files changed +22
-3
lines changed
3 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -217,9 +217,9 @@ let simple_merged_annotated_return (type a) (t : a t) (a : a) =
217
217
;;
218
218
219
219
[%% expect{|
220
- Line 3 , characters 12-20 :
220
+ Line 3 , characters 18-19 :
221
221
3 | | IntLit , (3 as x)
222
- ^^^^^^^ ^
222
+ ^
223
223
Error : This pattern matches values of type a
224
224
This instance of a is ambiguous :
225
225
it would escape the scope of its equation
Original file line number Diff line number Diff line change
1
+ (* TEST
2
+ * expect
3
+ *)
4
+ type t =
5
+ { x : int
6
+ ; y : int
7
+ }
8
+
9
+ let sum ({ x; y } as t ) = x + y
10
+
11
+ [%% expect{|
12
+ type t = { x : int ; y : int ; }
13
+ Line 6 , characters 21-22 :
14
+ 6 | let sum ({ x; y } as t ) = x + y
15
+ ^
16
+ Warning 26 [unused- var]: unused variable t.
17
+ val sum : t -> int = < fun>
18
+ |}]
19
+
Original file line number Diff line number Diff line change @@ -2540,7 +2540,7 @@ and type_pat_aux
2540
2540
let ty_var, mode = solve_Ppat_alias ~refine ~mode: alloc_mode.mode env q in
2541
2541
let mode = mode_cross_to_min ! env expected_ty mode in
2542
2542
let id =
2543
- enter_variable ~is_as_variable: true tps loc name mode
2543
+ enter_variable ~is_as_variable: true tps name. loc name mode
2544
2544
ty_var sp.ppat_attributes
2545
2545
in
2546
2546
rvp k {
You can’t perform that action at this time.
0 commit comments