diff --git a/test/SILGen/keypaths.swift b/test/SILGen/keypaths.swift index b6881a4d58c2b..5c28014c96262 100644 --- a/test/SILGen/keypaths.swift +++ b/test/SILGen/keypaths.swift @@ -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, (root $CodingStackEntry; stored_property #CodingStackEntry.key : $URICoderCodingKey) + + // CHECK-LABEL: sil hidden [ossa] @{{.*}}codingPathOpt + var codingPathOpt: [URICoderCodingKey?] { codingStack.map(\.key) } // CHECK: keypath $KeyPath, (root $CodingStackEntry; stored_property #CodingStackEntry.key : $URICoderCodingKey) }