Make Hack type checker produce error when async method is not awaitable
[hiphop-php.git] / hphp / hack / test / emitter / default_args.php
blob3b2911c518c4bb875c0b8214bd98c38ae876aae8
1 <?hh // strict
3 function foo(int $x, string $lol = ''): void {
4 var_dump($lol);
6 function f(int $x): int { return 12+$x; }
7 function bar(int $x, string $lol = (string)f($x)): void {
8 var_dump($lol);
10 function baz(int $x, string $lol = (string)f($x), int $lurr = 50): void {
11 var_dump($lol);
12 var_dump($lurr);
15 function test(): void {
16 foo(10);
17 foo(10, 'hello');
18 bar(10);
19 bar(10, 'hello');
20 baz(10);
21 baz(10, 'hello');
22 baz(10, 'hello', 1);