New inference: improved error message for unresolved type
[hiphop-php.git] / hphp / hack / test / typecheck / shape6.php
blob5475175fcc9aafde64fe118b4e66ac472506b820
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 type myshape = shape(
13 'field1' => int,
14 'field2' => bool,
17 function test(): int {
18 if (true) {
19 $x = shape('field1' => 0);
20 } else {
21 $x = shape('field1' => 0);
23 return $x[0];