Untyped variadic function types should not be permitted in strict mode
[hiphop-php.git] / hphp / hack / test / typecheck / await_preserves_nullability.php
blob34c5e9abec7e300d4976affb3929e7aa5544f607
1 <?hh // partial
2 /**
3 * Copyright (c) 2014, Facebook, Inc.
4 * All rights reserved.
6 * This source code is licensed under the BSD-style license found in the
7 * LICENSE file in the "hack" directory of this source tree. An additional grant
8 * of patent rights can be found in the PATENTS file in the same directory.
12 class Foo<T> {
13 public async function print_if_possible(
14 ?Awaitable<T> $blah,
15 ): Awaitable<void> {
16 $x = await $blah;
17 $this->doer($x);
20 private function doer(T $item): void {
21 if ($item) {
22 print $item;