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.Dismiss alert
import Foundation
leturl=URL(fileURLWithPath:"/Projects/file.txt")
if FileManager.default.fileExists(atPath: url.path){print(tryData(contentsOf: url))}
It works in Swift 5.9.2 release, but throws an error in Swift 5.10 release:
Swift/ErrorType.swift:200: Fatal error: Error raised at top level: Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"
Current stack trace:
0 (null) 0x00007ffca6a24ae0 swift_stdlib_reportFatalErrorInFile + 132
Swift version 5.10 (swift-5.10-RELEASE)
Target: x86_64-unknown-windows-msvc
OS Version: 10.0.19045 N/A Build 19045
A simple script to reproduce the issue:
It works in Swift 5.9.2 release, but throws an error in Swift 5.10 release:
Swift version 5.10 (swift-5.10-RELEASE)
Target: x86_64-unknown-windows-msvc
OS Version: 10.0.19045 N/A Build 19045
Possibly introduced by #4802
The text was updated successfully, but these errors were encountered: