mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[CS] Only use unsolved applicable fn for @dynamicMemberLookup cases
This works around the fact that existential opening does not currently work correctly in cases where the argument isn't resolved before the applicable fn is solved.
This commit is contained in:
@@ -601,3 +601,18 @@ struct TestIssue56837 {
|
||||
_ = value[type: Int8.max]
|
||||
}
|
||||
}
|
||||
|
||||
@dynamicMemberLookup
|
||||
class TestDynamicSelf {
|
||||
struct S {
|
||||
subscript() -> Int { 0 }
|
||||
}
|
||||
func foo() -> Self {
|
||||
// Make sure we can do dynamic member lookup on a dynamic self.
|
||||
_ = self[]
|
||||
return self
|
||||
}
|
||||
subscript<T>(dynamicMember dynamicMember: KeyPath<S, T>) -> T {
|
||||
fatalError()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user