make standalone enums normal python classes
[hiphop-php.git] / hphp / hack / test / typecheck / shape6.php
blobdcf40a7dc4e3f9e17f55c20c8ffca2bea9402788
1 <?hh
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];