Skip to content

Commit

Permalink
Improve completeness of xhp attribute check
Browse files Browse the repository at this point in the history
Summary: Partial undo of {D40796712}, uses the common facility for like types instead of custom logic, improves completeness for compound types.

Differential Revision: D45938412

fbshipit-source-id: 0722459a95a5c240a4823471a529ef7e0cdac874
  • Loading branch information
vassilmladenov authored and facebook-github-bot committed May 17, 2023
1 parent 174c69c commit f9a431a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions hphp/hack/src/typing/tast_check/xhp_required_check.ml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ let collect_attrs_from_ty_sid ?(include_optional = false) env add bag sid =
let rec collect_attrs_from_ty env set ty =
let (_, ty) = Env.expand_type env ty in
let tenv = Tast_env.tast_env_as_typing_env env in
let ty = Typing_utils.strip_dynamic tenv ty in
match get_node ty with
| Tunion tys ->
(* Filter out dynamic, as we conservatively assume that anything dynamic
Expand Down

0 comments on commit f9a431a

Please sign in to comment.