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-14702] No code completion result when completing nested type in Optional #57052

Closed
ahoppen opened this issue Jun 2, 2021 · 1 comment
Closed
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-14702
Radar rdar://78779137
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: 72d27f87c6a0aa99af027ee3433419b2

duplicates:

  • SR-14684 No code completion for return value of optional function type

Issue Description:

The following test case returns no completion results. When the ? is removed, SheetType is suggested correctly.

// RUN: %swift-ide-test --code-completion --source-filename %s --code-completion-token=COMPLETE
struct Sheet {
    enum SheetType {
    }
}

struct AboutView {
    private var selectedSheet: Sheet.#^COMPLETE^#SheetType?
}

Module
The same issue also applies when qualifying the type with a module. This is most likely the same issue.

// RUN: %swift-ide-test --code-completion --source-filename %s --code-completion-token=COMPLETE -I %S/Inputs/Purchases.swiftinterface

import Purchases

public class SubscriptionManager {
    public var subscription: Purchases.#^COMPLETE^#Package?
}

Purchases.swiftinterface

// swift-interface-format-version: 1.0
// swift-module-flags: -target x86_64-apple-macos10.9 -module-name Purchases

public struct Package {}
@ahoppen
Copy link
Contributor Author

ahoppen commented Jun 11, 2021

Fixed in #37874

@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