File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ (* TEST *)
2+
3+ (* closed, inlined *)
4+ let [@ inline always] f () () = print_endline " 4"
5+ let () = (let () = print_string " 3" in f) (print_string " 2" ) (print_string " 1" )
6+
7+ (* closed, not inlined *)
8+ let [@ inline never] f () () = print_endline " 4"
9+ let () = (let () = print_string " 3" in f) (print_string " 2" ) (print_string " 1" )
10+
11+ (* closure, inlined *)
12+ let [@ inline never] g x =
13+ (let () = print_string " 3" in fun () () -> print_endline x)
14+ (print_string " 2" ) (print_string " 1" )
15+ let () = g " 4"
16+
17+ (* closure, not inlined *)
18+ let [@ inline never] g x =
19+ (let () = print_string " 3" in
20+ let [@ inline never] f () () = print_endline x in f)
21+ (print_string " 2" ) (print_string " 1" )
22+ let () = g " 4"
Original file line number Diff line number Diff line change 1+ 1234
2+ 1234
3+ 1234
4+ 1234
You can’t perform that action at this time.
0 commit comments