Add tests for not virtualized functions
[hiphop-php.git] / hphp / hack / test / typecheck / expression_trees_not_virtualize_functions / instance_method_call2.php
blob1a1336d939d08bd15ba4e1644887888c31147262
1 <?hh
3 <<file:__EnableUnstableFeatures('expression_trees')>>
5 final class MyClass {
6 public function bar(ExampleString $_): ExampleInt {
7 throw new Exception();
11 function getMyClass(
12 ExampleContext $_,
13 ): Awaitable<ExprTree<ExampleDsl, ExampleDsl::TAst, (function(): MyClass)>> {
14 throw new Exception();
17 function foo(): void {
18 $fun_call = ExampleDsl`() ==> {
19 getMyClass()->bar("baz");
20 }`;