File tree 7 files changed +30
-17
lines changed
7 files changed +30
-17
lines changed Original file line number Diff line number Diff line change @@ -236,10 +236,7 @@ let rec expression : Env.env -> Typedtree.expression -> Use.t =
236
236
let arg env (_ , eo ) = option expression env eo in
237
237
Use. (join (inspect (expression env e)) (inspect (list arg env args)))
238
238
| Texp_tuple exprs -> Use. guard (list expression env exprs)
239
- | Texp_array exprs ->
240
- (* This is counted as a use, because constructing a generic array
241
- involves inspecting the elements (PR#6939). *)
242
- Use. inspect (list expression env exprs)
239
+ | Texp_array exprs -> Use. guard (list expression env exprs)
243
240
| Texp_construct (_ , desc , exprs ) ->
244
241
let access_constructor =
245
242
match desc.cstr_tag with
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ var Caml_obj = require ( "../../lib/js/caml_obj.js" ) ;
4
+
5
+ var vicky = { } ;
6
+
7
+ var teacher = { } ;
8
+
9
+ Caml_obj . update_dummy ( vicky , {
10
+ taughtBy : teacher
11
+ } ) ;
12
+
13
+ Caml_obj . update_dummy ( teacher , {
14
+ students : [ vicky ]
15
+ } ) ;
16
+
17
+ exports . vicky = vicky ;
18
+ exports . teacher = teacher ;
19
+ /* No side effect */
Original file line number Diff line number Diff line change
1
+ type rec student = {taughtBy : teacher }
2
+ and teacher = {students : array <student >}
3
+
4
+ let rec vicky = { taughtBy : teacher }
5
+ and teacher = {students : [vicky ]}
Original file line number Diff line number Diff line change @@ -38300,10 +38300,7 @@ let rec expression : Env.env -> Typedtree.expression -> Use.t =
38300
38300
let arg env (_, eo) = option expression env eo in
38301
38301
Use.(join (inspect (expression env e)) (inspect (list arg env args)))
38302
38302
| Texp_tuple exprs -> Use.guard (list expression env exprs)
38303
- | Texp_array exprs ->
38304
- (* This is counted as a use, because constructing a generic array
38305
- involves inspecting the elements (PR#6939). *)
38306
- Use.inspect (list expression env exprs)
38303
+ | Texp_array exprs -> Use.guard (list expression env exprs)
38307
38304
| Texp_construct (_, desc, exprs) ->
38308
38305
let access_constructor =
38309
38306
match desc.cstr_tag with
Original file line number Diff line number Diff line change @@ -38300,10 +38300,7 @@ let rec expression : Env.env -> Typedtree.expression -> Use.t =
38300
38300
let arg env (_, eo) = option expression env eo in
38301
38301
Use.(join (inspect (expression env e)) (inspect (list arg env args)))
38302
38302
| Texp_tuple exprs -> Use.guard (list expression env exprs)
38303
- | Texp_array exprs ->
38304
- (* This is counted as a use, because constructing a generic array
38305
- involves inspecting the elements (PR#6939). *)
38306
- Use.inspect (list expression env exprs)
38303
+ | Texp_array exprs -> Use.guard (list expression env exprs)
38307
38304
| Texp_construct (_, desc, exprs) ->
38308
38305
let access_constructor =
38309
38306
match desc.cstr_tag with
Original file line number Diff line number Diff line change @@ -212831,10 +212831,7 @@ let rec expression : Env.env -> Typedtree.expression -> Use.t =
212831
212831
let arg env (_, eo) = option expression env eo in
212832
212832
Use.(join (inspect (expression env e)) (inspect (list arg env args)))
212833
212833
| Texp_tuple exprs -> Use.guard (list expression env exprs)
212834
- | Texp_array exprs ->
212835
- (* This is counted as a use, because constructing a generic array
212836
- involves inspecting the elements (PR#6939). *)
212837
- Use.inspect (list expression env exprs)
212834
+ | Texp_array exprs -> Use.guard (list expression env exprs)
212838
212835
| Texp_construct (_, desc, exprs) ->
212839
212836
let access_constructor =
212840
212837
match desc.cstr_tag with
You can’t perform that action at this time.
0 commit comments