Error on self::class on non final classes
[hiphop-php.git] / hphp / hack / test / typecheck / mixed_instanceof.php
blobe95d00c06ec6884b9d949a97d04e81403d935903
1 <?hh // strict
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.
12 function foo(): mixed {
13 return 0;
16 function test(bool $statement): bool {
17 if(!$statement) {
18 $y = foo();
19 assert($y is Exception);
20 throw $y;
22 return $statement;