Untyped variadic function types should not be permitted in strict mode
[hiphop-php.git] / hphp / hack / test / typecheck / method_dispatch_37.php
blob38450b9b3a7485bfcb28868ece8b43077de95b07
1 <?hh // strict
2 /**
3 * Copyright (c) 2014, Facebook, Inc.
4 * All rights reserved.
6 * This source code is licensed under the BSD-style license found in the
7 * LICENSE file in the "hack" directory of this source tree. An additional grant
8 * of patent rights can be found in the PATENTS file in the same directory.
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(A $x): void {
25 // UNSAFE
26 $x::f1();
28 public static function test2(): void {}
31 class C {
32 public function f3(): void {}
33 public static function f4(): void {}