Files
swift-mirror/test/SILGen/keypath_dynamic.swift
Michael Gottesman 9e13779702 [ownership] Remove most -enable-sil-ownership from SILGen now that %target-swift-emit-silgen does it automatically.
I did this using a sed pattern and verified by hand that I was only touching
target-swift-emit-silgen lines.
2018-12-13 11:54:54 -08:00

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)
}
}