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;
35 public function getVector(): Vector
<T
> {
41 function testBool(bool $arg): void
{}
43 function test(): void
{
49 $results = (new X($objs))->getVector();
50 foreach ($results as $result) {
51 // Hack should complain it's an int !