Add tests for not virtualized functions
[hiphop-php.git] / hphp / hack / test / typecheck / expression_trees_not_virtualize_functions / postfix_plus_plus.php
blobcd33a291cd160dfe7ae915d59201ad57f233bde4
1 <?hh
3 <<file: __EnableUnstableFeatures('expression_trees')>>
5 final class MyClassWithPostfixPlusPlus {
6 public function __postfixPlusPlus(): MyClassWithPostfixPlusPlus {
7 throw new Exception();
11 // These should all work without problem
12 function test(): void {
13 ExampleDsl`() ==> {
14 $x = 1;
15 $x++;
16 }`;
18 ExampleDsl`(ExampleInt $x) ==> {
19 $x++;
20 }`;
22 ExampleDsl`() ==> {
23 $j = 0;
24 for ($i = 0; $i < 10; $i++) {
25 $j = $j + $i;
27 return $j;
28 }`;
30 ExampleDsl`(MyClassWithPostfixPlusPlus $i) ==> {
31 $i++;
32 }`;