mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Fixes an issue where parent type wasn't set for qualified ObjC pointers which leads to crashes during Sema because non-pointer uses are imported correctly. Resolves: rdar://102564592
26 lines
545 B
Swift
26 lines
545 B
Swift
// RUN: %empty-directory(%t/src)
|
|
// RUN: split-file %s %t/src
|
|
|
|
// RUN: %target-swift-frontend -typecheck -disable-objc-attr-requires-foundation-module -import-objc-header %t/src/ObjC.h -O %t/src/main.swift
|
|
|
|
// REQUIRES: objc_interop
|
|
|
|
//--- ObjC.h
|
|
|
|
@interface MyUnit
|
|
@end
|
|
|
|
__attribute__((swift_name("Metrics.SomeMetric")))
|
|
@interface SomeMetric <T: MyUnit *>
|
|
@end
|
|
|
|
@interface Metrics
|
|
@property (readonly, strong) SomeMetric<MyUnit *> *metric;
|
|
@end
|
|
|
|
//--- main.swift
|
|
func test(metrics: Metrics) -> Metrics.SomeMetric<MyUnit> {
|
|
metrics.metric
|
|
}
|
|
|