3 * Copyright (c) 2014, Facebook, Inc.
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 TestGeneric
<T
> {
15 public function __construct(T
$obj) {
19 public function get(): T
{
24 class X
<T
, Tc
as TestGeneric
<T
> > {
25 public Vector
<T
> $vec;
27 public function __construct(Vector
<Tc
> $tests) {
29 foreach ($tests as $test) {
30 $results[] = $test->get();
32 $this->vec
= $results;
38 function testBool(bool $arg): void
{}
40 function test(): void
{
46 $results = (new X($objs))->vec
;
47 foreach ($results as $result) {
48 // Hack should complain it's an int !