Skip to content

Commit b34bae3

Browse files
committed
Link to PHP internals discussion about new Foo(...)
1 parent ae9d7cb commit b34bae3

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,6 +1105,7 @@ protected function emitCallableNew($result, $callable) {
11051105
$t= $result->temp();
11061106
$result->out->write("fn(...{$t}) => ");
11071107

1108+
// See https://externals.io/message/129329
11081109
$callable->type->arguments= [new UnpackExpression(new Variable(substr($t, 1)), $callable->line)];
11091110
$this->emitOne($result, $callable->type);
11101111
$callable->type->arguments= null;

src/test/php/lang/ast/unittest/emit/CallableSyntaxTest.class.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
/**
77
* Tests for first-class callable syntax
88
*
9+
* @see https://externals.io/message/129329
910
* @see https://wiki.php.net/rfc/fcc_in_const_expr
1011
* @see https://wiki.php.net/rfc/first_class_callable_syntax#proposal
1112
*/

0 commit comments

Comments
 (0)