Updating submodules
[hiphop-php.git] / hphp / hack / test / typecheck / function_pointer / final_self.php
blob7452139295409fb4536f162629cedf23874d424b
1 <?hh
3 /* Due to class context forwarding behavior of lsb keyword self
4 * it is inconsistent to have self::foo<>() and (self::foo<>)()
5 * behaving differently. Because this behavior is inconsistent
6 * when used in non-final classes, allow it in final classes but
7 * not the alternative.
8 */
10 class BaseClass {
11 public static function foo(): void {}
14 final class Foo extends BaseClass {
15 public static function bar(): void {
16 self::foo<>;