Error on self::class on non final classes
[hiphop-php.git] / hphp / hack / test / typecheck / generator_ok_throw.php
blobf8ac38c81e7f3339b4375c4b40d56bce9032b9c1
1 <?hh // partial
2 /**
3 * Copyright (c) 2014, Facebook, Inc.
4 * All rights reserved.
6 * This source code is licensed under the MIT license found in the
7 * LICENSE file in the "hack" directory of this source tree.
13 async function test(?int $x): Awaitable<int> {
14 if($x === null) {
15 throw new Exception('Nooo');
17 return $x;