Fix a bug handling is expressions in non-method closures
commit601ff0925e09559f93c546d33b26f8acd8d86929
authorMark Williams <mwilliams@fb.com>
Thu, 15 Nov 2018 17:07:15 +0000 (15 09:07 -0800)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Thu, 15 Nov 2018 17:09:50 +0000 (15 09:09 -0800)
tree083113e5ed2b5c3d9f5c8ce300099052d8cf151c
parent12977c1e672a48941c6eca53b116f6d9ee45e44d
Fix a bug handling is expressions in non-method closures

Summary:
isMethod() always return's true on a closure's __invoke method because
its always called as a method; but after the prologue finishes, its
ActRec doesn't have a valid this/class unless it was defined inside a
method.

Reviewed By: ricklavoie, oulgen, alexeyt

Differential Revision: D13072597

fbshipit-source-id: c853678a14f063ba8f2ea7be3ec456a819b9396b
hphp/runtime/vm/bytecode.cpp
hphp/test/slow/is_expression/non-method-closure.php [new file with mode: 0644]
hphp/test/slow/is_expression/non-method-closure.php.expect [new file with mode: 0644]