Error on self::class on non final classes
[hiphop-php.git] / hphp / hack / test / typecheck / test_inter9.php
blobf91492194b137b30fdf31fd116494064d7d4617d
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.
12 interface I {}
13 class A implements I {
14 public function get(): void {}
16 class B implements I {}
17 class Z {}
19 function bar(): B {
20 $x = true ? null : new B();
21 if ($x === null) {
22 return new B();
24 return $x;