Disallow ... without type in function typehints
[hiphop-php.git] / hphp / hack / test / typecheck / shapes_remove_key.php
blob84aa468b58ca290ea6226b1dc8ae9fb9ece91fcc
1 <?hh // strict
2 // Copyright 2004-present Facebook. All Rights Reserved.
4 class Ref<T> {
5 public function __construct(public T $value) {}
8 function test(shape('a' => int, 'b' => int, ...) $s): void {
9 Shapes::removeKey(inout $s, 'a');
10 $r = new Ref($s);
11 $r->value['b'] = 0;
12 $r->value = shape('a' => 1, 'b' => 2);