File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
testsuite/tests/atomic-locs Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -177,6 +177,8 @@ module Extension_with_inline_record = struct
177177 let test : t -> int = function
178178 | A r -> r.x
179179 | _ -> 0
180+
181+ let () = assert (test (A { x = 42 }) = 42)
180182end
181183[%%expect{|
182184(apply (field_mut 1 (global Toploop!)) "Extension_with_inline_record/378"
185187 (makeblock 248 "Extension_with_inline_record.A" (caml_fresh_oo_id 0))
186188 test =
187189 (function param : int
188- (if (== (field_imm 0 param) A) (atomic_load param 1) 0)))
190+ (if (== (field_imm 0 param) A) (atomic_load param 1) 0))
191+ *match* =
192+ (if (== (apply test (makemutable 0 (* ,int) A 42)) 42) 0
193+ (raise (makeblock 0 (global Assert_failure!) [0: "" 11 11]))))
189194 (makeblock 0 A test)))
190195module Extension_with_inline_record :
191196 sig
@@ -205,7 +210,7 @@ module Float_records = struct
205210 let get v = v.y
206211end
207212[%%expect{|
208- (apply (field_mut 1 (global Toploop!)) "Float_records/390 "
213+ (apply (field_mut 1 (global Toploop!)) "Float_records/393 "
209214 (let
210215 (mk_t = (function x[float] y[float] (makemutable 0 (float,float) x y))
211216 get = (function v : float (atomic_load v 1)))
You can’t perform that action at this time.
0 commit comments