File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
lib/PhpParser/NodeVisitor
test/PhpParser/NodeVisitor Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,7 @@ public function enterNode(Node $node) {
91
91
$ this ->resolveSignature ($ node );
92
92
} elseif ($ node instanceof Stmt \ClassMethod
93
93
|| $ node instanceof Expr \Closure
94
+ || $ node instanceof Expr \ArrowFunction
94
95
) {
95
96
$ this ->resolveSignature ($ node );
96
97
} elseif ($ node instanceof Stmt \Property) {
Original file line number Diff line number Diff line change @@ -219,6 +219,10 @@ function(A $a) : A {};
219
219
function fn3(?A $a) : ?A {}
220
220
function fn4(?array $a) : ?array {}
221
221
222
+ fn(array $a): array => $a;
223
+ fn(A $a): A => $a;
224
+ fn(?A $a): ?A => $a;
225
+
222
226
A::b();
223
227
A::$b;
224
228
A::B;
@@ -263,6 +267,9 @@ function fn3(?\NS\A $a) : ?\NS\A
263
267
function fn4(?array $a) : ?array
264
268
{
265
269
}
270
+ fn(array $a): array => $a;
271
+ fn(\NS\A $a): \NS\A => $a;
272
+ fn(?\NS\A $a): ?\NS\A => $a;
266
273
\NS\A::b();
267
274
\NS\A::$b;
268
275
\NS\A::B;
You can’t perform that action at this time.
0 commit comments