mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
If an import-as-member property was used in a key path, we'd try to identify the component by its foreign-to-native thunk, which isn't normally generated (causing a crash from the missing symbol) and wouldn't be globally unique even if it were. Fixes rdar://problem/60519829.
8 lines
322 B
Swift
8 lines
322 B
Swift
// RUN: %target-swift-emit-silgen %s -import-objc-header %S/Inputs/keypaths_import_as_member.h | %FileCheck %s
|
|
|
|
// CHECK-LABEL: sil {{.*}} @$s{{.*}}23keyPathToImportedMember
|
|
func keyPathToImportedMember() {
|
|
// CHECK: keypath $KeyPath<Butt, Int32>, (root $Butt; gettable_property $Int32, id @ButtSize
|
|
_ = \Butt.size
|
|
}
|