Skip to content

Commit

Permalink
[flow] Pass None to exact_reason param of mk_object_type to sto…
Browse files Browse the repository at this point in the history
…p `ExactT` construction (1/n)

Summary:
I want to kill `ExactT`. To achieve that, we need to first migrate away all the sites that construct `ExactT`. One source of construction is in `slice_utils` [here](https://github.com/facebook/flow/blob/d9d9319cde578cff73e83071a4e62d992ceb855f/src/typing/slice_utils.ml#L50-L63), when we pass in a `Some _` for `exact_reason`.

In this series of diff, we will start the call sites where `def_reason` and `exact_reason` are the same, which should have no user visible changes. Therefore, we can stop the construction of `ExactT` in these instances by passing `None` instead.

In this diff, we migrate the callsite in `object_kit`

Changelog: [internal]

Reviewed By: panagosg7

Differential Revision: D56440367

fbshipit-source-id: ce712cea4c0e78569379ab0c92517b2ef63a1fdf
  • Loading branch information
SamChou19815 authored and facebook-github-bot committed Apr 23, 2024
1 parent 16beaf8 commit 2628948
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/typing/object_kit.ml
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ module Kit (Flow : Flow_common.S) : OBJECT = struct
let proto = ObjProtoT reason in
Slice_utils.mk_object_type
~def_reason:reason
~exact_reason:(Some reason)
~exact_reason:None
~invalidate_aliases:false
~interface:None
~reachable_targs
Expand Down

0 comments on commit 2628948

Please sign in to comment.