Debian Codegraph @

test/instrument/recent/react.t

raw
1 Let-bindings with [@@react.component] are not instrumented at their top level.
2
3 $ bash ../test.sh <<'EOF'
4 > module React = struct let forwardRef f = f () end
5 >
6 > let make1 = fun () -> ignore ignore
7 > [@@react.component]
8 >
9 > let make2 () = ignore ignore
10 > [@@react.component]
11 >
12 > let make3 = React.forwardRef (fun r -> ignore r)
13 > [@@react.component]
14 > EOF
15 module React = struct
16 let forwardRef f =
17 ___bisect_visit___ 0;
18 f ()
19 end
20
21 let make1 () =
22 ___bisect_visit___ 1;
23 ignore ignore
24 [@@react.component]
25
26 let make2 () =
27 ___bisect_visit___ 2;
28 ignore ignore
29 [@@react.component]
30
31 let make3 =
32 React.forwardRef (fun r ->
33 ___bisect_visit___ 3;
34 ignore r)
35 [@@react.component]