Skip to content

Commit 86e0677

Browse files
committed
Verify parameter annotations
1 parent d55f016 commit 86e0677

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/test/php/lang/ast/syntax/php/unittest/CompactMethodsTest.class.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,18 @@ public function cannot_redeclare() {
5454
}
5555

5656
#[@test]
57-
public function annotations() {
57+
public function method_annotations() {
5858
$t= $this->type('class <T> {
5959
<<test>> public fn fixture() => "test";
6060
}');
6161
Assert::equals(['test' => null], $t->getMethod('fixture')->getAnnotations());
6262
}
63+
64+
#[@test]
65+
public function param_annotations() {
66+
$t= $this->type('class <T> {
67+
public fn fixture(<<test>> $a) => "test";
68+
}');
69+
Assert::equals(['test' => null], $t->getMethod('fixture')->getParameter(0)->getAnnotations());
70+
}
6371
}

0 commit comments

Comments
 (0)