Enforce modularity boundaries for classes
[hiphop-php.git] / hphp / test / slow / shape-repo-fun.php
blobf71b8e11ad805cd6879c026d477aea78a508b1e3
1 <?hh
3 class K { const A = 0; const B = 1; }
4 class Q { const A = 'f'; const B = 'Q::B'; }
6 <<__EntryPoint>>
7 function main() {
8 $x = darray[0 => 42, 1 => 1337];
9 $y = darray['f' => 10];
10 $z = darray['Q::B' => 20];
11 $t = darray['f' => 10, 'Q::B' => 20];
13 var_dump($x is shape(K::A => int, K::B => int));
14 var_dump($y is shape(Q::A => int));
15 var_dump($z is shape(Q::B => int));
16 var_dump($t is shape(Q::A => int, Q::B => int));
18 var_dump($x is shape(Q::A => int, Q::B => int));
19 var_dump($y is shape(K::A => int));
20 var_dump($z is shape(K::B => int));
21 var_dump($t is shape(K::A => int, K::B => int));