You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Throw error when cannot resolve first argument's type in type_structure
Summary:
The following fatals in HHVM and is not caught by Hack.
```
<?hh
type MyCoolType = shape(
'a' => int,
...
);
<<__EntryPoint>>
function main(): void {
PHP\var_dump(type_structure(MyCoolType::class, 'TUhOh'));
}
```
This diff makes Hack throw an error when we can't properly resolve the type of the first argument to `type_structure`. Previously, we were typing the result of this to be `Tany` and not reporting an error.
We should not allow type alias's here at all in part because we cannot support the type alias resolution at HackC time and HHVM does not support resolving type aliases here.
Reviewed By: Wilfred
Differential Revision: D39483470
fbshipit-source-id: 7bced5c09f5ac0210c752774a566a70d365dce42
0 commit comments