Error on self::class on non final classes
[hiphop-php.git] / hphp / hack / test / typecheck / arraykey_type_hint_bad.php
blobd975ab1415e6029f804a197119918f723567139a
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 class C {}
14 function f(arraykey $k1, arraykey $k2): arraykey {
15 return $k2;
18 function test(): void {
19 $c = new C();
20 f($c, 2);