Avatar
@swift-5.1.5 struct Foo<Content> { let content: Content } @dynamicMemberLookup extension Foo { subscript<T>(dynamicMember keyPath: KeyPath<Content, T>) -> T { return content[keyPath: keyPath] } } print(Foo<Int>(content: 100).description)