1 // RUN: %hackc compile-infer %s | FileCheck %s
3 // CHECK: define $root.fcall_func(this: *void) : *HackMixed {
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 {
11 // CHECK: define $root.fcall_static(this: *void) : *HackMixed {
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 {
21 // CHECK: define $root.fcall_method(this: *void, $a: *HackMixed) : *HackMixed {
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 {
30 // CHECK: declare C.f(...): *HackMixed