Extend syntactic class pointer error to properties and returns
commita910b45d233c8e108ea0c3f8f4ab5651d433194d
authorVassil Mladenov <vmladenov@meta.com>
Mon, 20 May 2024 21:41:21 +0000 (20 14:41 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Mon, 20 May 2024 21:41:21 +0000 (20 14:41 -0700)
tree87a4800f75fb46f5a60939b28bb97ea70792398c
parentdc11908be970664b0f6b1f1c7a6661250a3130a3
Extend syntactic class pointer error to properties and returns

Summary: `return C::class;` in string-returning positions or `$this->foo = C::class` where `foo` is declared at the string type

Reviewed By: viratyosin

Differential Revision: D57576471

fbshipit-source-id: 9be2bc19b8365e0a3e50776c9928369bcdd49444
hphp/hack/src/typing/typing.ml
hphp/hack/test/typecheck/class_pointers/HH_FLAGS
hphp/hack/test/typecheck/class_pointers/syntactic_error.php
hphp/hack/test/typecheck/class_pointers/syntactic_error.php.exp