@@ -54,8 +54,9 @@ let f : local_ _ -> _ =
54
54
Line 2 , characters 14-15 :
55
55
2 | fun x -> f' x
56
56
^
57
- Error : This value escapes its region
58
- Hint : This argument cannot be local, because it is an argument in a tail call
57
+ Error : This value escapes its region.
58
+ Hint : This argument cannot be local,
59
+ because it is an argument in a tail call.
59
60
| }]
60
61
61
62
(* 2. constructor argument crosses mode at construction *)
@@ -71,7 +72,7 @@ let f : local_ _ -> bar =
71
72
Line 2 , characters 21-22 :
72
73
2 | fun n -> Bar0 (42 , n)
73
74
^
74
- Error : This value escapes its region
75
+ Error : This value escapes its region.
75
76
| }]
76
77
77
78
(* 3. record field crosses mode at construction *)
@@ -87,7 +88,7 @@ let f : local_ _ -> foo =
87
88
Line 2 , characters 24-25 :
88
89
2 | fun n -> {x = 42 ; y = n}
89
90
^
90
- Error : This value escapes its region
91
+ Error : This value escapes its region.
91
92
| }]
92
93
93
94
(* 4. expression crosses mode when being constrained *)
@@ -103,7 +104,7 @@ let f : local_ _ -> _ =
103
104
Line 2 , characters 12-13 :
104
105
2 | fun n -> (n : string )
105
106
^
106
- Error : This value escapes its region
107
+ Error : This value escapes its region.
107
108
| }]
108
109
109
110
(* 5. polymorphic variant arguments crosses mode on construction*)
@@ -119,7 +120,7 @@ let f : local_ _ -> [> `Text of string] =
119
120
Line 2 , characters 17-18 :
120
121
2 | fun n -> `Text n
121
122
^
122
- Error : This value escapes its region
123
+ Error : This value escapes its region.
123
124
| }]
124
125
125
126
(* tuple elements crosses mode at construction *)
@@ -135,7 +136,7 @@ let f : local_ _ -> string * string =
135
136
Line 2 , characters 12-13 :
136
137
2 | fun n -> (n, n)
137
138
^
138
- Error : This value escapes its region
139
+ Error : This value escapes its region.
139
140
| }]
140
141
141
142
(* array elements crosses mode at construction *)
@@ -151,7 +152,7 @@ let f: local_ _ -> string array =
151
152
Line 2 , characters 13-14 :
152
153
2 | fun n -> [|n; n|]
153
154
^
154
- Error : This value escapes its region
155
+ Error : This value escapes its region.
155
156
| }]
156
157
157
158
(* after discussion with sdolan, we agree that
@@ -179,7 +180,7 @@ let f : local_ foo -> _ =
179
180
Line 2 , characters 11-14 :
180
181
2 | fun r -> r.y
181
182
^^^
182
- Error : This value escapes its region
183
+ Error : This value escapes its region.
183
184
| }]
184
185
185
186
(* the expected type is not considered when mode crossing the result of
@@ -215,8 +216,9 @@ val g : string -> string = <fun>
215
216
Line 6 , characters 6-22 :
216
217
6 | g (local_ "world" )
217
218
^^^^^^^^^^^^^^^^
218
- Error : This value escapes its region
219
- Hint : This argument cannot be local , because it is an argument in a tail call
219
+ Error : This value escapes its region .
220
+ Hint : This argument cannot be local ,
221
+ because it is an argument in a tail call .
220
222
|}]
221
223
222
224
(* the result of function application crosses mode *)
@@ -244,7 +246,7 @@ let g : _ -> _ =
244
246
Line 2 , characters 28-29 :
245
247
2 | fun () -> let x = f () in x
246
248
^
247
- Error : This value escapes its region
249
+ Error : This value escapes its region.
248
250
| }]
249
251
250
252
(* constructor argument crosses modes upon pattern matching *)
@@ -276,7 +278,7 @@ let f : local_ bar -> _ =
276
278
Line 4 , characters 21-22 :
277
279
4 | | Bar0 (_ , y ) -> y
278
280
^
279
- Error : This value escapes its region
281
+ Error : This value escapes its region.
280
282
| }]
281
283
282
284
(* record fields crosses modes upon pattern matching *)
@@ -306,7 +308,7 @@ let f : local_ foo -> _ =
306
308
Line 4 , characters 16-17 :
307
309
4 | | {y; _} -> y
308
310
^
309
- Error : This value escapes its region
311
+ Error : This value escapes its region.
310
312
| }]
311
313
312
314
(* constraint crosses modes upon pattern matching *)
@@ -322,7 +324,7 @@ let f : local_ _ -> _ =
322
324
Line 2 , characters 22-23 :
323
325
2 | fun (x : string ) -> x
324
326
^
325
- Error : This value escapes its region
327
+ Error : This value escapes its region.
326
328
| }]
327
329
328
330
0 commit comments