Untyped variadic function types should not be permitted in strict mode
[hiphop-php.git] / hphp / hack / test / typecheck / poly_method_explicit_type_arguments_error.php
blobe95055c9d52fc1b5a9554948db3481f6bdd3156f
1 <?hh // strict
2 /**
3 * Copyright (c) 2014, Facebook, Inc.
4 * All rights reserved.
6 * This source code is licensed under the BSD-style license found in the
7 * LICENSE file in the "hack" directory of this source tree. An additional grant
8 * of patent rights can be found in the PATENTS file in the same directory.
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,