No error on use of `unsafe_cast`
[hiphop-php.git] / hphp / hack / test / typecheck / collection_mixed.php
blob16bd2308e2f1a692e1f22144b61ae875157ac2fa
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 testmap(): Map<arraykey, mixed> {
13 $m = Map{"s" => 1, "t" => 2};
14 $m[2] = 100;
15 return $m;
18 function testarray(): darray<mixed, int> {
19 $a = darray["s" => 1, "t" => 2];
20 $a[2] = 100;
21 return $a;