Generic way to check required reactivity for arguments at callsites
Summary:
This diff adds several things:
- new `fp_rx_condition` property on function parameters which is set if function parameter has some constraint that should be satisfied in order to treat function call as reactive
- at call site we check if argument type is a subtype of parameter type with augmented with constraint - i.e. for this case
```
<<__RxLocal, __OnlyRxIfArgs>>
function g(
<<__OnlyRxIfRxFunc>> (function(): int) $f
): void { ...}
f(() ==> 1);
```
we'll check if inferred type of argument $f is a subtype of `<__RxLocal>(function(): int)`.
This allows us to:
- handle `<<____OnlyRxIfRxFunc>>` parameters when parameter type is nullable function type
- set the base for the next step - parameters annotated with `<<__OnlyRxIfImpl(C::class)>>` where argument to function should be subtype of `C` in order for call to be reactive.
Reviewed By: jamesjwu
Differential Revision:
D7714071
fbshipit-source-id:
f19f9a0596eea46b3cb962a622d84c656191fc6a