Avatar
@swift-5.0.3 class Base { let val: String = "string" } class Sub: Base {} let object = Sub() print(object[keyPath: \Base.val]) // "string" print(object[keyPath: \Sub.val]) // Crash!