mirror of
https://github.com/apple/swift.git
synced 2026-10-28 21:15:56 +01:00
The opaque values test coverage I initially added will emit to stdout, which is noisy for people's logs if the test is failing for some other reason.
21 lines
424 B
Swift
21 lines
424 B
Swift
// RUN: %target-swift-emit-silgen-ossa -o /dev/null -enable-sil-opaque-values %s
|
|
// 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)
|
|
}
|
|
}
|