Files
swift-mirror/test/ClangImporter/Inputs/objc_init_generics.h
Doug Gregor 6486e6ca49 [Clang importer] Allow us to wire up overrides with generic classes.
A use of "getAs<ClassType>()" when trying to wire up the overrides of
an imported Objective-C initializer meant that imported Objective-C
generic classes didn't get their overrides set properly. This could
lead to redundant initializers; use a proper accessor, since we only
need the ClassDecl anyway.

Fixes SR-8142 / rdar://problem/41591677.
2018-07-03 10:50:24 -07:00

11 lines
274 B
Objective-C

@import Foundation;
@interface MyIntermediateClass : NSObject
- (nonnull instancetype)initWithDouble:(double)value NS_DESIGNATED_INITIALIZER;
@end
@interface MyGenericClass<__covariant T> : MyIntermediateClass
- (nonnull instancetype)initWithValue:(nonnull T)value;
@end