Support type constraint (typing, part 2)
Summary:
We currently only support reify modifier on case type T statements.
This diff allows to add constraint to such statements.
The goal is to support things like:
```
class C {
enum E {
case type T as num;
case T val;
:I(type T = int); // OK
:S(type S = string); // KO
}
public static function add<TP as static:E>(TP $x, TP $y) : num {
$x = static:E::val($x); // $x:T as num
$y = static:E::val($y); // $y:T as num
return $x + $y; // should be num
}
```
In this diff, I introduce the checking of the PU at use site (which
allow to type check `C::add`).
Reviewed By: mpu
Differential Revision:
D21884927
fbshipit-source-id:
c26999f3740a069ef0d8d00d7d9de621bad542b1