Add context constants to some hierarchies
[hiphop-php.git] / hphp / hack / hhi / hackarray.hhi
blob35c367edac7a0d849cb976431ed26b28471b92eb
1 <?hh // partial
2 /**
3  * Copyright (c) 2016, Facebook, Inc.
4  * All rights reserved.
5  *
6  * This source code is licensed under the MIT license found in the
7  * LICENSE file in the "hack" directory of this source tree.
8  *
9  */
11 <<file: __EnableUnstableFeatures('coeffects_provisional')>>
13 namespace HH {
15 /**
16  * The parent class for all array types (containers that are values).
17  * This currently includes both Hack Arrays (vec, dict, keyset) and Legacy
18  * Arrays (varray, darray).
19  */
20 <<__Sealed(dict::class, keyset::class, vec::class)>>
21 abstract class AnyArray<+Tk as arraykey, +Tv> implements KeyedContainer<Tk, Tv>, \XHPChild {
22   const ctx CMut = [];
25 abstract final class dict<+Tk as arraykey, +Tv> extends AnyArray<Tk, Tv> {}
26 abstract final class keyset<+T as arraykey> extends AnyArray<T, T> {}
27 abstract final class vec<+T> extends AnyArray<int, T> {}
29 } // namespace HH