mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add additional SILGen test for keypath-function subtype conversion
This commit is contained in:
@@ -649,7 +649,12 @@ struct CodingStackEntry {
|
||||
|
||||
struct Test {
|
||||
var codingStack: [CodingStackEntry]
|
||||
var codingPath: [any CodingKey] { codingStack.map(\.key) }
|
||||
// CHECK-LABEL: sil hidden [ossa] @{{.*}}codingPathAny
|
||||
var codingPathAny: [any CodingKey] { codingStack.map(\.key) }
|
||||
// CHECK: keypath $KeyPath<CodingStackEntry, URICoderCodingKey>, (root $CodingStackEntry; stored_property #CodingStackEntry.key : $URICoderCodingKey)
|
||||
|
||||
// CHECK-LABEL: sil hidden [ossa] @{{.*}}codingPathOpt
|
||||
var codingPathOpt: [URICoderCodingKey?] { codingStack.map(\.key) }
|
||||
// CHECK: keypath $KeyPath<CodingStackEntry, URICoderCodingKey>, (root $CodingStackEntry; stored_property #CodingStackEntry.key : $URICoderCodingKey)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user