Skip to content

Better detect if we're in a pattern before suggesting completions for let and var #67705

Open
@hamishknight

Description

@hamishknight

As noted in #67704 we currently suggest let and var in expression position due to the fact that we initially parse patterns as expressions. We ought to be able to detect if we're in a pattern context though, and only suggest let and var in that case.

rdar://113330201

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.code completionArea → source tooling: code completionexpressionsFeature: expressionslet & varFeature: constant and variable declarationssource toolingArea: IDE support, SourceKit, and other source toolingswift 5.9unexpected behaviorBug: Unexpected behavior or incorrect output

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions