Make closure and soft type specifiers a parse error
commitd9a87a147165e8ac847102bf164adcbc07fdf4cd
authorKunal Mehta <kunalm@fb.com>
Sun, 25 Feb 2018 22:28:54 +0000 (25 14:28 -0800)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Sun, 25 Feb 2018 22:49:13 +0000 (25 14:49 -0800)
treee0b3c191152aff0864fb7ebe78ec13d1a273484b
parentca49cc82fa5bd8e608f794f4f91241f88fcdbeee
Make closure and soft type specifiers a parse error

Summary:
These hints may never be used with `is`-expressions because:
- We have no information on a function's inputs/output at runtime.
- Soft typehints would be meaningless when testing types.

Reviewed By: periodic1236, oulgen

Differential Revision: D7076934

fbshipit-source-id: 42639d367cfa6a73b384098d6abf3796ad87b935
hphp/hack/src/parser/full_fidelity_parser_errors.ml
hphp/hack/src/parser/full_fidelity_syntax_error.ml
hphp/hack/src/parser/full_fidelity_syntax_error.mli
hphp/hack/test/full_fidelity/cases/is_expression/test_callable_hint.exp [new file with mode: 0644]
hphp/hack/test/full_fidelity/cases/is_expression/test_callable_hint.php [new file with mode: 0644]
hphp/hack/test/full_fidelity/cases/is_expression/test_soft_hint.exp [new file with mode: 0644]
hphp/hack/test/full_fidelity/cases/is_expression/test_soft_hint.php [new file with mode: 0644]
hphp/hack/test/full_fidelity/full_fidelity_unit_test.ml