mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
I did this using a sed pattern and verified by hand that I was only touching target-swift-emit-silgen lines.
20 lines
343 B
Swift
20 lines
343 B
Swift
// RUN: %target-swift-emit-silgen -module-name A %s | %FileCheck %s
|
|
|
|
struct Foo {
|
|
var x : Int {
|
|
get {
|
|
return 1
|
|
}
|
|
set {
|
|
}
|
|
}
|
|
|
|
func foo(_ kp: WritableKeyPath<Foo, Int>) {
|
|
}
|
|
|
|
func test() {
|
|
// CHECK: keypath $WritableKeyPath<Foo, Int>, (root $Foo; settable_property $Int, id @$s1A3FooV1xSivg
|
|
foo(\.x)
|
|
}
|
|
}
|