New inference: improved error message for unresolved type
[hiphop-php.git] / hphp / hack / test / typecheck / poly_method_explicit_type_arguments_error.php
blobabb871873ee1d25c254987fa4ec58a9406842671
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 MyVector<T> {
13 public static function fmap<T1, T2>(
14 (function(T1): T2) $f,
15 MyVector<T1> $x,
16 ): MyVector<T2> {
17 throw new Exception('test');
21 function test(): void {
22 $in = new MyVector();
23 $in2 = MyVector::fmap<string, string>(
24 function(int $x): string {
25 return 'x';
27 $in,