Untyped variadic function types should not be permitted in strict mode
[hiphop-php.git] / hphp / hack / test / typecheck / reactive / test_lambda_reactive.php
blob28ecaadea1b8268388dd40988fb9a7988e0cf6d9
1 <?hh // strict
2 <<__Rx>>
3 function test(): Rx<(function(): int)> {
4 $x = function() {
5 return 5;
6 };
7 return $x;
10 // $x is reactive, no error
11 function test2(): Rx<(function(): int)> {
12 $x = function() {
13 return 5;
15 return $x;
18 class GlobalClassName {
19 public static int $val = 5;
22 // $x is not reactive, error
23 function test3(): Rx<(function(): int)> {
24 $x = function() {
25 return GlobalClassName::$val;
27 return $x;