Manually fix or remove typechecker tests with `fun`, `class_meth`, or `inst_meth`
[hiphop-php.git] / hphp / test / slow / clsmeth-nocompat / invoke-ptr.php
blob9633816c83be69d3b3bcd9c580bd92704ee6c391
1 <?hh
3 <<__EntryPoint>>
4 function main() {
5 $cl = () ==> __hhvm_intrinsics\launder_value(false);
6 $cl();
8 try {
9 $f = HH\dynamic_class_meth(get_class($cl), "__invoke");
10 echo "ERROR: shouldn't be able to call dynamically\n";
11 $f();
12 } catch (Exception $e) {
13 echo "Caught!\n";
16 try {
17 $m = class_meth('Closure$main', '__invoke');
18 $m();
19 } catch (Exception $e) {
20 echo "Caught!\n";