Describe the bug@dynamicMemberLookup static subscripts do not work with unprefixed dot syntax.
Demonstration:
struct Color {
let red: Double
let green: Double
let blue: Double
let alpha: Double
}
@dynamicMemberLookup
struct Prop {
static subscript<T>(dynamicMember member: KeyPath<Color, T>) -> Self { Prop() }
}
_ = Prop.red // works
let prop: Prop = .red // does not work
Steps To Reproduce
Steps to reproduce the behavior:
Define a static dynamicMember subscript
Observe that it does not work with unprefixed dot syntax
Expected behavior
Dynamic properties are inferred the same way as other unprefixed properties are.
Environment (please fill out the following information)
Describe the bug
@dynamicMemberLookup
static subscripts do not work with unprefixed dot syntax.Demonstration:
Steps To Reproduce Steps to reproduce the behavior:
Expected behavior Dynamic properties are inferred the same way as other unprefixed properties are.
Environment (please fill out the following information)
Additional context Swift forums thread post discussing this issue.