Error on self::class on non final classes
[hiphop-php.git] / hphp / hack / test / typecheck / this_static_ret.php
blob6ec90aa314c62885e911e8629a73493dc406069d
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 <<__ConsistentConstruct>>
13 class Foo {
14 public static function get(): this {
15 return new static();
19 class Bar extends Foo {
20 public function something(): Bar {
21 return self::get();