New inference: improved error message for unresolved type
[hiphop-php.git] / hphp / hack / test / typecheck / override_attr_05.php
blobc34075717307b790017f8709585ce5532e4710c6
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 A {
13 public function foo(): void {}
15 public function bar(): void {}
17 public static function statFoo(): void {}
20 trait TUnrelated {
21 public function baz(): void {}
24 trait ATr {
25 <<__Override>> // enforced onto C1 with A as parent
26 public function foo(): void {}
28 <<__Override>> // enforced onto C1 with A as parent
29 public static function statFoo(): void {}
31 <<__Override>> // enforced onto C1 with A as parent
32 final public function bar(): void {}
34 use TUnrelated;
35 <<__Override>> // enforced immediately with TUnrelated parent
36 public function baz(): void {}
39 class C1 extends A {
40 use ATr;
43 class C2 extends C1 {
45 <<__Override>> // C1 is the parent
46 public function foo(): void {}