-
Notifications
You must be signed in to change notification settings - Fork 10.5k
SE-0080 (4/4) - Failable initializers for Float->Int #4314
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
SE-0080 (4/4) - Failable initializers for Float->Int #4314
Conversation
e92d3e0
to
be0e926
Compare
(Really late in the game here, I know) |
Let's get a test run at least. @swift-ci please smoke test. |
// @shahmishal |
@swift-ci please test. |
% end | ||
|
||
% if srcBits < SignificandBitCount: | ||
@available(*, message: "Converting ${That} to ${Self} will always succeed.") |
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.
Is there a test for this warning somewhere?
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.
No... I hadn't thought to test these/I'm not sure I know how.
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.
You can use GYB to write tests and the usual filecheck mechanism to check the warning.
@ultramiraculous Any update on this? Looks like some conflicts have been introduced at this point. I'd be up for helping to resolve them if you like. |
@jtbandes hey yeah sorry I at least completely dropped the ball on following up on this. Things got busy on my end. I can at least resolve the conflicts sometime today probably. |
be0e926
to
d5a6731
Compare
@gribozavr / @jtbandes Can this at least get the test suite run against it? |
@swift-ci please smoke test. |
Ping @CodaFi |
Okay, I can take responsibility for seeing this through. I left a comment about testing the warning. Because this addresses Dmitri's comments, it should be GTG after that. |
@CodaFi Can we merge this? |
This requires @ultramiraculous' attention still. |
@ultramiraculous I'm going to rebase onto this and add the test myself. |
@slavapestov Does this need to be PR'd over to 3.1 too? |
Yeah sorry about that and thanks. I keep trying to find time to focus on this. |
Well, on second thought I don't think the changes I want are enough to block this merge. ⛵️ |
What's in this pull request?
Breaking out from #2742. Adds init?(exactly:) initializers for float types from int types.
Resolved bug number: (SR-1491)
Before merging this pull request to apple/swift repository:
Triggering Swift CI
The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:
Smoke Testing
A smoke test on macOS does the following:
device standard libraries are not built.
version of these tests are not run.
A smoke test on Linux does the following:
tests are not run.
Validation Testing
Lint Testing
Note: Only members of the Apple organization can trigger swift-ci.