Allow XHP name to be used in a trait use statement
commit8279712ed61f043b2e7b203c1d866d07ea0039b6
authorKaty Voor <voork@fb.com>
Fri, 6 May 2022 08:07:43 +0000 (6 01:07 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 6 May 2022 08:07:43 +0000 (6 01:07 -0700)
tree197866accf770805053d17fbd510fe368dea390f
parent89a051e2eb3ad0ee91c80f1a66e3685ce1e51e1e
Allow XHP name to be used in a trait use statement

Summary:
```
trait :T {}
class C {
  use :T;
}
```
previously segfaulted.
I made `uses` type `ClassName` and used the mangle method we use for the rest of the xhp class names.

Reviewed By: aorenste

Differential Revision: D36171002

fbshipit-source-id: 1cc773269b5f686d82699d020a1118e357cd2a12
hphp/hack/src/hackc/emitter/emit_class.rs
hphp/hack/src/hackc/hhbc/hhas_class.rs
hphp/runtime/vm/hackc-translator.cpp
hphp/test/slow/xhp/use_xhp_trait.php [new file with mode: 0644]
hphp/test/slow/xhp/use_xhp_trait.php.expectf [new file with mode: 0644]