You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parameter is unused
Linter: Facebook\HHAST\UnusedParameterLinter
Location: /Users/greenberg/code/repro/unused_repro.hack:3:29
@@ -1,6 +1,6 @@
function ex(
int $i,
- (function(int): int) $fn = ($a) ==> {
+ (function(int): int) $fn = ($_a) ==> {
foo($a);
return 5;
},
Would you like to apply this fix?
[y]es/[n]o/yes to [a]ll/n[o] to all: Variable is unused
Linter: Facebook\HHAST\UnusedVariableLinter
Location: /Users/greenberg/code/repro/unused_repro.hack:4:6
Code:
>$a
Both are very confused about what to do with the lambda as a parameter default value. I think UnusedParameter needs to look for parameters that are children of the declaration rather than descendants.
The text was updated successfully, but these errors were encountered:
This sample code:
produces these errors:
Both are very confused about what to do with the lambda as a parameter default value. I think UnusedParameter needs to look for parameters that are children of the declaration rather than descendants.
The text was updated successfully, but these errors were encountered: