Skip to content

Commit f3a5a9d

Browse files
authored
Merge pull request #18252 from rudkx/add-test-for-rdar32057712
Add test for the long-ago fixed rdar://problem/32057712.
2 parents 90c9c06 + fc16473 commit f3a5a9d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/expr/unary/keypath/keypath.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,13 @@ func testSubtypeKeypathProtocol(_ keyPath: ReferenceWritableKeyPath<PP, Int>) {
652652
testSubtypeKeypathProtocol(\Base.i) // expected-error {{type 'PP' has no member 'i'}}
653653
}
654654

655+
// rdar://problem/32057712
656+
struct Container {
657+
let base: Base? = Base()
658+
}
659+
660+
var rdar32057712 = \Container.base?.i
661+
655662
func testSyntaxErrors() { // expected-note{{}}
656663
_ = \. ; // expected-error{{expected member name following '.'}}
657664
_ = \.a ;

0 commit comments

Comments
 (0)