add constraint on args when calling with any as function type
Summary:
When typechecking a call, if the function type is unknown (any or dynamic and the like), then its arguments should coerce to the corresponding type.
This has impact:
- in global inference:
```
class A {
public $foo;
public function f($x): void {
$this->foo->bar($x);
}
}
```
In the above, $x would have type #1, and we want to record that `#1 <: Tany` to avoid infering mixed
- But also in the general case: see the added test and the inline comments
For now, this is gated by the infer_missing flag. The question is: should it be?
Reviewed By: manzyuk
Differential Revision:
D16892210
fbshipit-source-id:
83e93f1a691dbe3338cdd1bfb2c7714228f4f2da