New inference: eager solving for function application
commitde5226f66c75d0b489b6f74f14089250a8df9e35
authorAndrew Kennedy <akenn@fb.com>
Wed, 19 Dec 2018 08:33:38 +0000 (19 00:33 -0800)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Wed, 19 Dec 2018 08:39:23 +0000 (19 00:39 -0800)
tree23d9a78699633c48ad622742607332608dbc27bc
parente04a1210e7687963fa12041337ef370e97a6e737
New inference: eager solving for function application

Summary: With the `--new-inference` flag some function applications fail to type-check because the function expression has a unsolved type variable type. Best approach would be to subtype against a function type with fresh type variables, but we also need to consider reactivity, coroutineness etc which massively complicates matters. So for now, let's eagerly solve the type variable.

Reviewed By: manzyuk

Differential Revision: D13505123

fbshipit-source-id: 553cf89bb0265e36a762573c3af46b5d66bfbf1c
hphp/hack/src/typing/typing.ml
hphp/hack/test/typecheck/new_inference/eager_solve/apply_tvar.php [new file with mode: 0644]
hphp/hack/test/typecheck/new_inference/eager_solve/apply_tvar.php.exp [new file with mode: 0644]