Open
Description
Is your feature request related to a problem? Please describe.
Dynamic member lookup subscript should support file:line:
default parameters. Knowing the calling context of the lookup can be important for surfacing where the source origin of a problem is.
Describe the solution you'd like
The following code should compile:
@dynamicMemberLookup
struct S<T> {
var wrappedValue: T
subscript<U>(
dynamicMember keyPath: KeyPath<T, U>
// Comment the next line out and all is well.
, file: StaticString = #file, line: UInt = #line
) -> U {
self.wrappedValue[keyPath: keyPath]
}
}