typechecker: add auto-import functions
commit7089b411103d90bd02fc5f2d221d2f7ddf483b98
authorEugene Letuchy <eletuchy@fb.com>
Fri, 22 May 2015 08:33:52 +0000 (22 01:33 -0700)
committerhhvm-bot <hhvm-bot@fb.com>
Sat, 23 May 2015 10:00:36 +0000 (23 03:00 -0700)
tree39ed2187be13a3370bb60d6d1cd71d705237385e
parent778a1bfa92fc4c266cc787fc465462f7a9966888
typechecker: add auto-import functions

Summary: `invariant` and `invariant_violation` need to be on the
 auto-import list, since they're no longer to be hard-coded in the
 typechecker as parse nodes. Testing this showed a long-standing bug
 in "namespace-elaboration" incorrectly applying to the declarations
 defining an auto-imported name (e.g. `Vector`) in namespace.

Reviewed By: @jwatzman

Differential Revision: D2095129
hphp/hack/src/naming/naming.ml
hphp/hack/src/parsing/namespaces.ml
hphp/hack/test/typecheck/namespace_global_builtin2.php [new file with mode: 0644]
hphp/hack/test/typecheck/namespace_global_builtin2.php.exp [new file with mode: 0644]