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
swift 4.0 xcode10.1
md5: 2467d443fac596d2ce87215ba390028d
duplicates:
Issue Description:
I use KeyPath class as! WritableKeyPath class can change Immutable value
struct Test{ let a : String = "1" } let keyPath : WritableKeyPath<Test,String> = \Test.a as! WritableKeyPath<Test, String> var t : Test = Test() t.a // "1" t[keyPath : keyPath] = "2" t.a // "2"
The text was updated successfully, but these errors were encountered:
Fixed in Swift 5!
Sorry, something went wrong.
No branches or pull requests
Attachment: Download
Environment
swift 4.0 xcode10.1
Additional Detail from JIRA
md5: 2467d443fac596d2ce87215ba390028d
duplicates:
Issue Description:
I use KeyPath class as! WritableKeyPath class can change Immutable value
struct Test{
let a : String = "1"
}
let keyPath : WritableKeyPath<Test,String> = \Test.a as! WritableKeyPath<Test, String>
var t : Test = Test()
t.a // "1"
t[keyPath : keyPath] = "2"
t.a // "2"
The text was updated successfully, but these errors were encountered: