No error on use of `unsafe_cast`
[hiphop-php.git] / hphp / hack / test / typecheck / dict_const.php
blob55b9d739fbf1786be6519833fb18cb2575682241
1 <?hh // strict
2 // Copyright 2004-present Facebook. All Rights Reserved.
4 const dict<string, string> empty_dict = dict[];
5 const dict<int, string>
6 dict_const_element = dict[1 => 'foo', 2 => 'bar', 3 => 'baz'];
8 const dict<string, vec<dict<string, int>>>
9 nested_dict = dict['foo' => vec[dict['baz' => 5]]];
11 const dict<string, (function(): int)>
12 dict_with_illegal_elements = dict['foo' => () ==> 1];