Saved searches

Use saved searches to filter your results more quickly

Cancel Create saved search Sign up Reseting focus

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

swiftlang / swift Public

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

Ambiguous reference to member inside @storageRestrictions #69601

jeudesprits opened this issue Nov 2, 2023 · 0 comments

Ambiguous reference to member inside @storageRestrictions #69601

jeudesprits opened this issue Nov 2, 2023 · 0 comments

bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels

Comments

jeudesprits commented Nov 2, 2023 •

Description
Ambiguous reference to member inside @storageRestrictions, when the type has a static symbol with the same name

Steps to reproduce

public struct UIAngle  public var radians: CGFloat @inlinable public var degrees: CGFloat  @storageRestrictions(initializes: radians) // init(initialValue)  radians = initialValue * (.pi / 180.0) // > get  radians * (180.0 / .pi) > set  radians = newValue * (.pi / 180.0) > > @inlinable public init(radians: CGFloat)  self.radians = radians > @inlinable public init(degrees: CGFloat)  self.degrees = degrees > > extension UIAngle  @inlinable public static func radians(_ radians: consuming CGFloat) -> Self  .init(radians: radians) > @inlinable public static func degrees(_ degrees: consuming CGFloat) -> Self  .init(degrees: degrees) > >

Expected behavior
There should be no errors

image

Screenshots

Environment

swift-driver version: 1.87.3 Apple Swift version 5.9.2 (swiftlang-5.9.2.2.51 clang-1500.1.0.2.2) Target: arm64-apple-macosx14.0 
Xcode 15.1 Build version 15C5042i 

The text was updated successfully, but these errors were encountered: