Handle this typehints
[hiphop-php.git] / hphp / test / quick / hopt-eqObj.php
blobfdea6194d67631e35573ceab1f96f6fb39296b8e
1 <?hh
3 class X {}
5 function foo($x, $y) {
6 return $x == $y;
8 $x = new X;
9 foo($x, $x);
12 $x = new X;
13 $y = new stdClass;
15 function baz($r, $s) {
16 switch ($r) {
17 case $s: echo 'arg '; break;
18 default: echo 'def ';
21 baz($x, $y);
23 function bal($r, $s) {
24 if ($r == $s) {
25 echo 'arg ';
26 } else {
27 echo 'def ';
30 bal($x, $y);
32 printf("\n");