New update is not compilable
Hello! Today I stuck with an issue after swift-2-old branch was dropped. Some Mirror's declaration don't work anymore, Ex:
- let itemMirror: Mirror? doesnt compile https://gyazo.com/b5efc0486eaf7db664f5353661c4772b
if let value = itemMirror[param] where value is String { return value as? String } (type Mirror doesn't have subscript members)) https://gyazo.com/9547f3b03852993d1d49b675ad0f3a44
What can be the reason? Thank you.
Hi, thanks for reporting issue. Is it possible to actually see the code so I can try to fix it?
1 issue:
The mirror is generic type. Try Mirror<Int>?
2 Issue
Yes the subscript operator was disable for now because of new API in Swift.Mirror reflection API. It should be fixed very soon. I'm sorry for that troubles
Take a look at screenshots attached. Is it possible to make an Mirror var as a field in struct?
I think it should be possible, don't see any reason why it shouldn't work
Is it possible also to return back swift-2-old branch where subscripts worked?
I'm sorry but that branch was completely wrong and borken. That's why it was deleted.
Can you please check swift-2.0 branch. The subscript should work there.