File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
testsuite/tests/mixed-blocks Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ (* TEST
2
+ runtime5;
3
+ include stdlib_beta;
4
+ ocamlopt_flags="-extension layouts_alpha -extension small_numbers";
5
+ native;
6
+ *)
7
+
8
+ (* From https://github.com/ocaml-flambda/flambda-backend/pull/2698
9
+ although submitted as part of
10
+ https://github.com/ocaml-flambda/flambda-backend/pull/2763
11
+ *)
12
+
13
+ module Float32_u = Stdlib_beta. Float32_u
14
+
15
+ type t =
16
+ | Mutable_str of { mutable x : string }
17
+ | Float32 of float32 #
18
+
19
+ let [@ inline always] go x y =
20
+ let f =
21
+ match x with
22
+ | Float32 f32 ->
23
+ (fun[@ inline never] () ->
24
+ match y with
25
+ | Mutable_str _ -> f32
26
+ | Float32 _ -> assert false )
27
+ | Mutable_str _ -> assert false
28
+ in
29
+ f ()
30
+
31
+ let () =
32
+ let x = Float32 #4. s in
33
+ let y = Mutable_str { x = " s" } in
34
+ let _ = go x y in
35
+ ()
You can’t perform that action at this time.
0 commit comments