File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
Inputs/clang-importer-sdk/usr/include Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -116,3 +116,22 @@ class C6: C5, ServiceProvider {
116116extension ImplementsLoadable : @retroactive Loadable {
117117 public func loadStuff( withOtherIdentifier otherIdentifier: Int , reply: @escaping ( ) -> Void ) { }
118118}
119+
120+ class ImplementsDictionaryLoader1 : DictionaryLoader {
121+ func loadDictionary( completionHandler: @escaping ( [ String : NSNumber ] ? ) -> Void ) { }
122+ }
123+
124+ // expected-error@+1 {{type 'ImplementsDictionaryLoader2' does not conform to protocol 'DictionaryLoader'}}
125+ class ImplementsDictionaryLoader2 : DictionaryLoader {
126+ func loadDictionary( completionHandler: @escaping ( [ String : Any ] ? ) -> Void ) { } // expected-note {{candidate has non-matching type '(@escaping ([String : Any]?) -> Void) -> ()'}}
127+ }
128+
129+ // expected-error@+1 {{type 'ImplementsDictionaryLoader3' does not conform to protocol 'DictionaryLoader'}}
130+ class ImplementsDictionaryLoader3 : DictionaryLoader {
131+ func loadDictionary( completionHandler: @escaping ( [ String : NSNumber ? ] ? ) -> Void ) { } // expected-note {{candidate has non-matching type '(@escaping ([String : NSNumber?]?) -> Void) -> ()'}}
132+ }
133+
134+ // expected-error@+1 {{type 'ImplementsDictionaryLoader4' does not conform to protocol 'DictionaryLoader'}}
135+ class ImplementsDictionaryLoader4 : DictionaryLoader {
136+ func loadDictionary( completionHandler: @escaping ( [ String : Int ] ? ) -> Void ) { } // expected-note {{candidate has non-matching type '(@escaping ([String : Int]?) -> Void) -> ()'}}
137+ }
Original file line number Diff line number Diff line change @@ -355,4 +355,8 @@ MAIN_ACTOR
355355- (void )loadStuffWithGroupID : (NSInteger )groupID reply : (void (^)())reply ;
356356@end
357357
358+ @protocol DictionaryLoader
359+ - (void )loadDictionaryWithCompletionHandler : (void (^)(NSDictionary <NSString *, NSNumber *> * _Nullable))completionHandler ;
360+ @end
361+
358362#pragma clang assume_nonnull end
You can’t perform that action at this time.
0 commit comments