New inference: improved error message for unresolved type
[hiphop-php.git] / hphp / hack / test / typecheck / strict_call_tany3.php
bloba69884cfa45f1bb26725166a30da4ebb6bfa19b5
1 //// partial.php
2 <?hh // partial
4 function any() {}
6 //// strict.php
7 <?hh // strict
9 function nullthrows<T>(?T $x): T {
10 if ($x !== null) {
11 return $x;
14 invariant_violation('lol');
17 async function f(): Awaitable<void> {
18 $a = await any();
19 $n = nullthrows($a);
20 // That this works at all in strict mode is probably a bug, but just making
21 // sure it doesn't give an empty position for now. (Until we remove the
22 // restriction on calling methods on Tany in strict, of course.)
23 $n->f();