Box param types
[hiphop-php.git] / hphp / hack / src / hackc / test / infer / fcall.hack
blob619a195c4e81d5ead816ab438ea4e7705e437eb6
1 // RUN: %hackc compile-infer %s | FileCheck %s
3 // CHECK: define $root.fcall_func(this: *void) : *HackMixed {
4 // CHECK: #b0:
5 // CHECK:   n0 = $root.f(null, $builtins.hack_int(1), $builtins.hack_int(2), $builtins.hack_int(3))
6 // CHECK:   ret $builtins.hack_null()
7 function fcall_func(): void {
8   f(1, 2, 3);
11 // CHECK: define $root.fcall_static(this: *void) : *HackMixed {
12 // CHECK: #b0:
13 // CHECK:   n0: *C$static = load &static_singleton::C
14 // CHECK:   n1 = $builtins.lazy_initialize(n0)
15 // CHECK:   n2 = C.f(n0, $builtins.hack_int(1), $builtins.hack_int(2), $builtins.hack_int(3))
16 // CHECK:   ret $builtins.hack_null()
17 function fcall_static(): void {
18   C::f(1, 2, 3);
21 // CHECK: define $root.fcall_method(this: *void, $a: *HackMixed) : *HackMixed {
22 // CHECK: #b0:
23 // CHECK:   n0: *HackMixed = load &$a
24 // CHECK:   n1 = n0.HackMixed.b($builtins.hack_int(1), $builtins.hack_int(2), $builtins.hack_int(3))
25 // CHECK:   ret $builtins.hack_null()
26 function fcall_method(C $a): void {
27   $a->b(1, 2, 3);
30 // CHECK: declare C.f(...): *HackMixed