Remove assert false in classname lookup
commitaca47bfc2cc4695dcf3499b32637a306dacbed82
authorJez Ng <jezng@fb.com>
Sat, 19 Dec 2015 23:31:15 +0000 (19 15:31 -0800)
committerhhvm-bot <hhvm-bot@fb.com>
Sun, 20 Dec 2015 00:00:32 +0000 (19 16:00 -0800)
tree49583bb1c02eb5f5a046d82a9786b3522a239a9c
parent4c2be3985e400746b2bc5682d2782dbef22b7567
Remove assert false in classname lookup

Summary:
In order to get the desired Tclass type when analyzing visibility, we
should have been calling static_class_id, not get_base_type. However, every
time we want to check a class member's / method's visibility, we already have
determined the class_type (in order to figure out the member). Thus, instead of
redoing that work and risk getting it wrong, we should just pass the class_type
along to the visibility checking function.

Reviewed By: dabek

Differential Revision: D2773488

fb-gh-sync-id: ba0056c909530e23c83092eb91e15877d8c35e99
hphp/hack/src/server/autocompleteService.ml
hphp/hack/src/typing/typing.ml
hphp/hack/src/typing/typing.mli
hphp/hack/test/typecheck/classname/private_access.php [new file with mode: 0644]
hphp/hack/test/typecheck/classname/private_access.php.exp [new file with mode: 0644]