No error on use of `unsafe_cast`
[hiphop-php.git] / hphp / hack / test / typecheck / method_dispatch_31.php
blob4cf60b1e6bdf2c262b9759d7d6ec92e0a5d38582
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 /**
13 * Hack treats method dispatch in a different way from PHP.
16 class A {
17 public function f1(): void {}
18 public static function f2(): void {}
21 class B extends A {
22 public function f1(): void {}
23 public static function f2(): void {}
24 public function test1(): void {
25 self::f1();
27 public static function test2(): void {}
30 class C {
31 public function f3(): void {}
32 public static function f4(): void {}