-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Add 'bitPattern:' label to '(U)Int.init(ObjectIdentifier)' #3634
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
Add 'bitPattern:' label to '(U)Int.init(ObjectIdentifier)' #3634
Conversation
@swift-ci Please smoke test |
20d7e29
to
46a81cd
Compare
@swift-ci Please smoke test linux |
@@ -631,3 +631,17 @@ extension ObjectIdentifier { | |||
Builtin.unreachable() | |||
} | |||
} | |||
|
|||
extension UInt { | |||
@available(*, unavailable, message: "use the 'UInt(bitPattern:)' initializer") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use renamed="init(bitPattern:)"
so that users will get a fixit?
Just two small suggestions, but LGTM otherwise! Thank you! |
public init(_ objectID: ObjectIdentifier) { | ||
Builtin.unreachable() | ||
} | ||
} | ||
|
||
extension Int { | ||
@available(*, unavailable, message: "use the 'Int(bitPattern:)' initializer") | ||
@available(*, unavailable, message: "init(bitPattern:)") | ||
public init(_ objectID: ObjectIdentifier) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be 'renamed' not 'message' will fix.
SR-2064 rdar://27327186
42725f7
to
b6da135
Compare
@swift-ci Please test and merge |
Failure looks spurious. |
Add 'bitPattern:' label to '(U)Int.init(ObjectIdentifier)'
This the patch for swift-evolution proposal 0124.
SR-2064
rdar://27327186