Skip to content

Commit 12e517b

Browse files
committed
Make code consistent with other places in emitter
1 parent a9bc033 commit 12e517b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/php/lang/ast/emit/CallablesAsClosures.class.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ protected function emitCallable($result, $callable) {
2020
// [Foo::class, $method](...); => use ($method)
2121
$use= [];
2222
foreach ($result->codegen->search($callable, 'variable') as $var) {
23-
'this' === $var->name || $use[$var->name]= true;
23+
$use[$var->name]= true;
2424
}
25+
unset($use['this']);
2526

2627
// Create closure
2728
$t= $result->temp();

0 commit comments

Comments
 (0)