Fix duplicate typedef type info overwrite
commitbcf87d4f3d1ad3386b01db7d11e9f205783b2b0e
authorMillie Chen <milliechen@fb.com>
Tue, 2 Nov 2021 18:57:55 +0000 (2 11:57 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Tue, 2 Nov 2021 18:59:47 +0000 (2 11:59 -0700)
treec569d9c666f2653a088625ebe7963505060b8166
parent923a54f4a6f57ca05d815abd80f0c94fe0101523
Fix duplicate typedef type info overwrite

Summary: When a duplicate type alias is encountered, don't blindly insert it into our `base_types` map. The helper `add_or_update_classish_decl` ensures that the existing value for the alias becomes `Mixed` if it differs from the new definition.

Reviewed By: shayne-fletcher

Differential Revision: D32087934

fbshipit-source-id: 9dd6962773c4ad0af91e513fbda290ce5655e629
hphp/hack/src/facts/facts.rs