Skip to content

ComposeModifierReused false positive on a shadowed parameter name #268

@jzbrooks

Description

@jzbrooks

I was tinkering with some ideas a couple days ago and noticed that this check fails the use of a locally scoped modifier instance if it has the same name as the composable parameter's modifier argument. I would expect the check to take scope into consideration and not fail when the modifier parameter name has been shadowed.

Notice below that the name modifier inside the Row (I wish I'd screencap'd the line numbers). Renaming that variable works around the problem.

Error

Screenshot 2024-02-02 at 10 12 50 AM

Rename Workaround

Screenshot 2024-02-02 at 10 13 27 AM

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions