Create new instance from Mirror
Closed this issue · 1 comments
getaaron commented
Something like this would be great:
struct Person {
let name: String
var age: Int
}
var person = Person(name: "Jon", age: 27)
var mirror = Mirror(person)
// make some changes to mirror
var person2 = Person(mirror: mirror) // a modified version of Jon
getaaron commented
I think this is impossible in the current version of Swift