diff --git a/src/test/php/lang/ast/unittest/emit/CallableSyntaxTest.class.php b/src/test/php/lang/ast/unittest/emit/CallableSyntaxTest.class.php index e9211bb9..5baba689 100755 --- a/src/test/php/lang/ast/unittest/emit/CallableSyntaxTest.class.php +++ b/src/test/php/lang/ast/unittest/emit/CallableSyntaxTest.class.php @@ -6,6 +6,7 @@ /** * Tests for first-class callable syntax * + * @see https://wiki.php.net/rfc/fcc_in_const_expr * @see https://wiki.php.net/rfc/first_class_callable_syntax#proposal */ class CallableSyntaxTest extends EmittingTest { @@ -182,4 +183,16 @@ public function __construct($value) { $this->value= $value; } }'); Assert::equals($this, $f($this)->value); } + + #[Test] + public function inside_annotation() { + $f= $this->run('use lang\Reflection; class %T { + + #[Attr(strrev(...))] + public function run() { + return Reflection::of($this)->method("run")->annotation(Attr::class)->argument(0); + } + }'); + Assert::equals('cba', $f('abc')); + } } \ No newline at end of file