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
let scanner = Scanner(string: "0.5 bla")
var value = scanner.scanDouble()
print(value!)
value = scanner.scanDouble()
if value == nil {
print("ok")
}
print(value as Any)
================================================
The text was updated successfully, but these errors were encountered:
Environment
Ubuntu Linux 19.10
Swift 5.1.1 from swift.org
Additional Detail from JIRA
md5: 0b02550c3fd4ef2ca8f58a5b22550c8a
Issue Description:
On Linux, the following code outputs
0.5
Optional(0.0)
where I expected (and get on macOS):
0.5
ok
nil
================================================
import Foundation
let scanner = Scanner(string: "0.5 bla")
var value = scanner.scanDouble()
print(value!)
value = scanner.scanDouble()
if value == nil {
print("ok")
}
print(value as Any)
================================================
The text was updated successfully, but these errors were encountered: