fix: subscripting tuple by value index (#172)

This commit is contained in:
Ilya Puchka
2018-04-05 01:25:13 +01:00
committed by Kyle Fuller
parent f457cddd3f
commit 2e6a7215c5
3 changed files with 16 additions and 2 deletions

View File

@@ -183,7 +183,7 @@ func parseFilterComponents(token: String) -> (String, [Variable]) {
extension Mirror {
func getValue(for key: String) -> Any? {
let result = descendant(key)
let result = descendant(key) ?? Int(key).flatMap({ descendant($0) })
if result == nil {
// go through inheritance chain to reach superclass properties
return superclassMirror?.getValue(for: key)