Skip to content

[SR-14737] Missing argument label completion for generic initializer inside closure #57087

@ahoppen

Description

@ahoppen
Previous ID SR-14737
Radar rdar://problem/79092374
Original Reporter @ahoppen
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s CodeCompletion
Labels Bug, FoundByStressTester
Assignee @rintaro
Priority Medium

md5: 2d08989172c8e74d199cce680bb46a1c

relates to:

Issue Description:

In the following test case the isActive argument label is not suggested. When removing the x.map closure around it, the argument label is properly completed.

// RUN: %swift-ide-test --code-completion --source-filename %s --code-completion-token=COMPLETE

struct TodayView {
    var x {
        let x = Bool?
        x.map { _ in
            NavigationLink2(destination: true, #^COMPLETE^#isActive: true)
        }
    }
}

public struct NavigationLink2<Label> {
    public init(destination: Label, isActive: Bool) { fatalError() }
}

Metadata

Metadata

Assignees

Labels

argument labelsFeature: function argument labelsbugA deviation from expected or documented behavior. Also: expected but undesirable behavior.call expressionsFeature → expressions: Call expressionsclosuresFeature: closurescode completionArea → source tooling: code completionexpressionsFeature: expressionsfound by stress testerFlag: An issue found by the SourceKit stress testersource toolingArea: IDE support, SourceKit, and other source toolingunexpected 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