Do not report duplicate errors for inherited type constants
commitac4430ca88a929df1cc679aa508e6664f3adc556
authorAndrew Kennedy <akenn@fb.com>
Thu, 14 May 2020 17:32:08 +0000 (14 10:32 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 14 May 2020 17:41:40 +0000 (14 10:41 -0700)
tree45f7134f5ef0700aa027c4eb84e50167446a5431
parent93438de1f3aaf7123be449021b13101632e65048
Do not report duplicate errors for inherited type constants

Summary: Like it says in the title. Currently we recheck various aspects of type constants (e.g. reifiability) when they are inherited in subclasses. This leads to duplicate errors; worse, the errors are reported when checking the subclass, but with the position of the error reported in the superclass.

Reviewed By: manzyuk

Differential Revision: D21545358

fbshipit-source-id: d75f4b1ef2276ef0a5185c32078aef95996fa1ae
hphp/hack/src/typing/tast_check/type_const_check.ml
hphp/hack/src/typing/typing_extends.ml
hphp/hack/test/typecheck/reified_generics/reifiable3.php.exp
hphp/hack/test/typecheck/reified_generics/reifiable3.php.legacy_decl.exp
hphp/hack/test/typecheck/reified_generics/reifiable3.php.like_types.exp