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-10953] Invalid exposure of static type members as instance members on a protocol metatype #53344

Open
DevAndArtist mannequin opened this issue Jun 17, 2019 · 0 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. code completion Area → source tooling: code completion source tooling Area: IDE support, SourceKit, and other source tooling

Comments

@DevAndArtist
Copy link
Mannequin

DevAndArtist mannequin commented Jun 17, 2019

Previous ID SR-10953
Radar None
Original Reporter @DevAndArtist
Type Bug
Environment

Apple Swift version 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.5)

Additional Detail from JIRA
Votes 1
Component/s CodeCompletion
Labels Bug
Assignee None
Priority Medium

md5: 54d389e2b5855aa629bb5c80e5df3a7b

Issue Description:

Auto completion in Xcode exposes these static type members as instance members of a protocol metatype.

protocol P {
  static func foo()
}

extension P {
  static func bar() {}
}

P.self.bar() // error: Static member 'bar' cannot be used on protocol metatype 'P.Protocol'
P.self.foo() // error: Static member 'foo' cannot be used on protocol metatype 'P.Protocol'

Related discussion: https://forums.swift.org/t/does-a-protocol-metatype-have-these-instance-members-or-not/25978

@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
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 source tooling Area: IDE support, SourceKit, and other source tooling
Projects
None yet
Development

No branches or pull requests

1 participant