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
HTTPCookiePropertyKey does not restricts the type of the value to be String only. Based on the Darwin behavior I believe the substring is acceptable and the current behavior is a bug .
Additional Detail from JIRA
md5: c9d5bc0021712729bd7fe8e2cae62b9f
Issue Description:
The following code successfully creates an HTTPCookie on Darwin, whereas on Linux the initializer returns nil:
The initializer takes values as Any, so this code compiles, but fails silently. The initializer in SCLF is trying to cast the values to String:
swift-corelibs-foundation/Foundation/HTTPCookie.swift
Line 257 in 125825b
Is it expected that you should be able to pass a Substring here, and should the cast be to something like StringProtocol instead?
The text was updated successfully, but these errors were encountered: