New inference: improved error message for unresolved type
[hiphop-php.git] / hphp / hack / test / typecheck / constraint_gen_fail1.php
blobf118cc9efbf79dab13bebccce30da2862988a8de
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 A {
13 public function render(): string { return ""; }
16 function foo<T as A>(Vector<T> $x): Vector<T> {
17 $x[0] = new A();
18 return $x;