Disallow ... without type in function typehints
[hiphop-php.git] / hphp / hack / test / typecheck / gen_trait2.php
blobb26273ad1130e6e8d1dd3182b1a0b84ec389628f
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 trait MyTrait<T> {
13 protected Vector<T> $a;
14 public function test(): T {
15 return $this->a[0];
19 class A {
20 use MyTrait<A>;
22 public function __construct(A $x) {
23 $this->a = Vector { $x };