global statement removal: hphp/test [7/x]
[hiphop-php.git] / hphp / test / quick / methodcache_case.php
blob62c915c06619b18fad1af3e2a784b78a29fb9d3b
1 <?hh
3 abstract class one {
4 abstract protected function foo();
7 class a extends one {
8 protected function foo() { echo "a\n"; }
11 class b extends one {
12 protected function FoO() { echo "b\n"; }
15 class c extends one {
16 protected function foo() { echo "c\n"; }
18 public function go($x) {
19 $x->foo();
23 function main() {
24 $a = new a;
25 $b = new b;
26 $c = new c;
27 $c->go($a); // fill
28 $c->go($a); // hit
29 $c->go($b); // would call with not AttrPublic
30 $c->go($c); // again
31 $c->go($c); // hit
32 $c->go($a); // would call, not attr public
35 main();