Add tests for not virtualized functions
[hiphop-php.git] / hphp / hack / test / typecheck / expression_trees_not_virtualize_functions / helper_function_type_const.php
blobd4e8ba707bcc395403d5e01b174ff37cb626e4fc
1 <?hh
3 <<file:__EnableUnstableFeatures('expression_trees')>>
5 class Wrapper<T> {}
7 abstract class MyBox {
8 abstract const type TInner as mixed;
11 class IntBox extends MyBox {
12 const type TInner = ExampleInt;
15 async function setState<T as MyBox, TVal>(
16 ExampleContext $_visitor,
17 ): Awaitable<ExprTree<ExampleDsl, ExampleDsl::TAst, (function(Wrapper<T>, TVal): void)>>
18 where
19 TVal = T::TInner {
20 throw new \Exception();
23 function test(ExprTree<ExampleDsl, ExampleDsl::TAst, Wrapper<IntBox>> $x): void {
24 ExampleDsl`setState(${$x}, 1)`;