Skip to content

Commit 609a732

Browse files
nmotefacebook-github-bot
authored andcommitted
Remove Loc.btwn call when processing intersection types
Reviewed By: samwgoldman Differential Revision: D10223294 fbshipit-source-id: 9383a76113799b76858bf386b463521a6707e040
1 parent 358f62e commit 609a732

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

src/typing/flow_js.ml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11740,12 +11740,9 @@ and object_kit =
1174011740
props, dict, flags
1174111741
in
1174211742

11743-
let intersect2_with_reason reason ((r1, _, _, _) as x1) ((r2, _, _, _) as x2) =
11743+
let intersect2_with_reason reason intersection_loc x1 x2 =
1174411744
let props, dict, flags = intersect2 reason x1 x2 in
11745-
let r =
11746-
let loc = Loc.btwn (aloc_of_reason r1 |> ALoc.to_loc) (aloc_of_reason r2 |> ALoc.to_loc) in
11747-
mk_reason RObjectType (loc |> ALoc.of_loc)
11748-
in
11745+
let r = mk_reason RObjectType intersection_loc in
1174911746
r, props, dict, flags
1175011747
in
1175111748

@@ -11760,7 +11757,7 @@ and object_kit =
1176011757
| [] ->
1176111758
let x = match join with
1176211759
| _, Or -> Nel.cons x done_rev |> Nel.concat
11763-
| _, And -> merge (intersect2_with_reason reason) x done_rev
11760+
| loc, And -> merge (intersect2_with_reason reason loc) x done_rev
1176411761
in
1176511762
next tool cx trace use_op reason tout x
1176611763
| t::todo ->

0 commit comments

Comments
 (0)