Error on self::class on non final classes
[hiphop-php.git] / hphp / hack / test / typecheck / test_inter5.php
blobcedaa196d3f813317aa702d2a0cc0363e1d9e144
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 interface I {}
13 class A implements I {}
14 class B implements I {}
15 class Z {}
17 function foo(Vector<I> $x): void {
18 $x[32] = new A();
20 function callA(A $x): void {}
22 function bar(): void {
23 $x = Vector { new A() };
24 foo($x);