Things are not in sync between corelibs foundation and foundation on 5.2.4 though, which causes us a bunch of painful workaround and headaches - is there a chance that the patch will also apply to any 5.2.x if/when there's going to be one?
macOS, swift 5.2.4, good:
Welcome to Apple Swift version 5.2.4 (swift-5.2.4-RELEASE).
1>importFoundation3>JSONDecoder().decode(Int.self, from: "23".data(using: .utf8)!)
ubuntu, swift 5.2.4, bad:
Welcome to Swift version 5.2.4 (swift-5.2.4-RELEASE).
1>importFoundation3>let s =JSONDecoder().decode(Int.self, from: "42".data(using: .utf8)!)
s:Int=0// oh oh...
Things are correct on Swift 5.3, however we're not really ready to require users to bump to that version, so we're stuck with building manually looking ahead at the bytes if it maybe it a top level value and trying to handle it "manually" today...
The text was updated successfully, but these errors were encountered: