Remove Naming.predef_funs
commit88fb3ff16f275c921e4e2fffcea1938823c746da
authorJez Ng <jezng@fb.com>
Tue, 4 Aug 2015 04:36:52 +0000 (3 21:36 -0700)
committerhhvm-bot <hhvm-bot@fb.com>
Tue, 4 Aug 2015 05:02:34 +0000 (3 22:02 -0700)
tree7d5e4d8da3b5480ff3fcd04670b428c9885ab0a2
parent162f954f5b25c64ebf9cf408f4076ddc98f09f18
Remove Naming.predef_funs

Summary: It seems to be part of a legacy design. These "predefined
functions" can be named just like any other builtin, so there's no need
to special-case them. Moreover, the typing code that was also
unnecessarily special-casing calls to these functions would call List.hd
on their argument lists without checking if the list was nonempty, so
calling `is_int()` without arguments would crash the typechecker.

Reviewed By: @dabek

Differential Revision: D2308024
hphp/hack/hhi/stdlib/builtins_variable.hhi
hphp/hack/src/hh_single_type_check.ml
hphp/hack/src/naming/naming.ml
hphp/hack/src/naming/naming.mli
hphp/hack/src/typing/typing.ml