We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Attachment: Download
macOS:
xxx@yyyyyy$ swift --version Apple Swift version 5.3 (swiftlang-1200.0.29.2 clang-1200.0.30.1) Target: x86_64-apple-darwin19.6.0
Linux:
root@377b4eb21ba1:/tmp# swift --version Swift version 5.3 (swift-5.3-RELEASE) Target: x86_64-unknown-linux-gnu
md5: c3b6f4573b92d32f4ad3004b160fcd38
Issue Description:
On macOS, Date correctly implements Strideable, but it doesn't on Linux (swift-5.3-RELEASE).
Try running the attached test.swift file on macOS, yielding the expected output:
xxx@yyyyyyy$ swift test.swift 1.0
Trying to run the same on Linux (using the official swift:latest docker image) yields:
root@377b4eb21ba1:/tmp# swift test.swift test.swift:5:12: error: value of type 'Date' has no member 'distance' print(date.distance(to: date.advanced(by: 1.0))) ~~~~ ^~~~~~~~ test.swift:5:30: error: value of type 'Date' has no member 'advanced' print(date.distance(to: date.advanced(by: 1.0))) ~~~~ ^~~~~~~~
Test program (also attached):
import Foundation let date = Date() print(date.distance(to: date.advanced(by: 1.0)))
The text was updated successfully, but these errors were encountered:
@swift-ci create
Sorry, something went wrong.
This is fixed in the main branch, a backport to 5.3 is @ #2890
main
No branches or pull requests
Attachment: Download
Environment
macOS:
Linux:
Additional Detail from JIRA
md5: c3b6f4573b92d32f4ad3004b160fcd38
Issue Description:
On macOS, Date correctly implements Strideable, but it doesn't on Linux (swift-5.3-RELEASE).
Try running the attached test.swift file on macOS, yielding the expected output:
Trying to run the same on Linux (using the official swift:latest docker image) yields:
Test program (also attached):
The text was updated successfully, but these errors were encountered: