Namespace use declarations with ':'s shouldn't be allowed
commit092c46226a15a94aad7e961b9f9c58f4a423651d
authorPatricia McKenzie <mckenzie@meta.com>
Mon, 20 May 2024 22:55:31 +0000 (20 15:55 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Mon, 20 May 2024 22:55:31 +0000 (20 15:55 -0700)
tree268b0efe1b4381e0c880c64118f54c027dc0cdf6
parent957c962b959e20a25b83d4c29b9f1ab674f2ba68
Namespace use declarations with ':'s shouldn't be allowed

Summary:
the : character should not be used to name a namespace.

This covers the case where the name doesn't start with :. I will also make sure the alias doesn't start with :.

To do: double check with vassilmladenov if the logic here should be 'doesn't start with :' or 'doesn't contain :'.

Reviewed By: vassilmladenov

Differential Revision: D57444656

fbshipit-source-id: 87d155451a96a9630510f9e0cdcc3c34a99666de
hphp/hack/src/parser/lowerer/lowerer.rs
hphp/hack/src/parser/syntax_error.rs
hphp/test/slow/namespace/alias/T75671842.php [new file with mode: 0644]
hphp/test/slow/namespace/alias/T75671842.php.expectf [new file with mode: 0644]