Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-14708] Missing code completion inside string interpolation in result builder #57058

Closed
ahoppen opened this issue Jun 2, 2021 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. code completion Area → source tooling: code completion found by stress tester Flag: An issue found by the SourceKit stress tester source tooling Area: IDE support, SourceKit, and other source tooling

Comments

@ahoppen
Copy link
Contributor

ahoppen commented Jun 2, 2021

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

md5: 48769077daadf3e2aceccc6e80be50b2

Issue Description:

The following test case is missing the chance property from the code completion results.

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

struct MysteryIslandDetail {
    let island: MysteryIsland2
    
    @ViewBuilder2 var body: some View2 {
        let b = "\(island.#^COMPLETE^#chance)"
        VStack2() {}
    }
    
    func makeInfoCell(detail: String) -> Text2 { fatalError() }
}

struct VStack2<Content> : View2 where Content : View2 {
    init(@ViewBuilder2 content: () -> Content) { fatalError() }
}

protocol View2 {}
 
extension Never : View2 {}

struct Text2: View2 {}

@resultBuilder struct ViewBuilder2 {
    static func buildBlock() -> Never { fatalError() }
    static func buildBlock<Content>(_ content: Content) -> Content where Content : View2 { fatalError() }
}

struct MysteryIsland2 {
    let chance: Int = 2
}
@ahoppen
Copy link
Contributor Author

ahoppen commented Apr 11, 2022

Stopped occurring in the stress tester. Adding the test case to the test suite here: #42295

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added the source tooling Area: IDE support, SourceKit, and other source tooling label Feb 6, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. code completion Area → source tooling: code completion found by stress tester Flag: An issue found by the SourceKit stress tester source tooling Area: IDE support, SourceKit, and other source tooling
Projects
None yet
Development

No branches or pull requests

2 participants