Error on self::class on non final classes
[hiphop-php.git] / hphp / hack / test / typecheck / override_attr_03.php
blobc832dca035754a99ca438142c131d34282c7be83
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 class UnrelatedParent {}
14 class CParent {
15 public function foo(): void {}
18 trait ATrait {
19 public function foo(): void {}
22 trait UnrelatedTrait {}
24 interface I {
25 public function bar(): void;
28 class CTrait extends UnrelatedParent implements I {
29 use ATrait;
31 <<__Override>>
32 public function foo(): void {}
34 public function bar(): void {}
37 class CParentAndTrait extends CParent implements I {
38 use ATrait;
39 use UnrelatedTrait;
41 <<__Override>>
42 public function foo(): void {}
44 public function bar(): void {}