Skip to content

Arrow Functions and compact method cause false positive for UndefinedVariable bug #330

Closed
@yokozawa0701

Description

@yokozawa0701

Here's a simple example that generates UndefinedVariable for using the Arrow Functions and compact method.

$something = fn ($arg) => compact('arg');  // Unused function parameter $arg. (VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable) 

I am using v2.11.19.
Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions