Disallow ... without type in function typehints
[hiphop-php.git] / hphp / hack / test / typecheck / list_varray.php
blob4196a5fc698b012838fd63acb5e9566ee3a60a7d
1 <?hh // partial
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 function test(): int {
13 list($x, $y) = varray[1, 2];
14 return $x;
17 function test2(varray<int> $x): int {
18 list($x, $y) = $x;
19 return $x;
22 function test3(varray<int> $x): bool {
23 list($x, $y) = $x;
24 return $x;