Fix typing.ml changing positions in enum classes
commit9ef520259ba74ce96c1aefa65ba10f9667a68341
authorWilfred Hughes <wilfred@fb.com>
Thu, 11 Aug 2022 18:46:18 +0000 (11 11:46 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 11 Aug 2022 18:46:18 +0000 (11 11:46 -0700)
tree59b579c6d685b037d4abcd248138dbb51bfeb1db
parent14e702fb04daca8df516a68a1235d74565f18706
Fix typing.ml changing positions in enum classes

Summary:
When type checking `Foo#bar`, we were replacing the position of `Foo` with the whole position of `Foo#bar`.

Pass the original `Foo` position through, so we don't change the position values.

Reviewed By: vsiles

Differential Revision: D38598490

fbshipit-source-id: 1b954a567dc70ea04258cab929cd2850a1001eaf
hphp/hack/src/typing/typing.ml
hphp/hack/test/tast/enum_class_label.php [new file with mode: 0644]
hphp/hack/test/tast/enum_class_label.php.exp [new file with mode: 0644]