Skip to content

Commit 2170823

Browse files
committed
Add test for nested arrow functions
1 parent 779884c commit 2170823

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Tests/VariableAnalysisSniff/fixtures/ArrowFunctionFixture.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,3 +166,12 @@ function arrowFunctionWithQuotes($allowedReferrers) {
166166
&& $permissionName !== CustomPermission::ALL_CONFIG
167167
);
168168
}
169+
170+
function arrowFunctionWithNestedArrowFunction() {
171+
$fn = fn($outerArrowArg) => [
172+
$outerArrowArg,
173+
fn($insideArg) => $insideArg,
174+
$outerArrowArg,
175+
];
176+
$fn();
177+
}

0 commit comments

Comments
 (0)