[TIMOB-24450] Hyperloop: iOS - Invalid wrapper code generated for blocks within generic classes
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Medium |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | Hyperloop 2.0.1 |
| Fix Version/s | n/a |
| Components | Hyperloop, iOS |
| Labels | n/a |
| Reporter | Jan Vennemann |
| Assignee | Unknown |
| Created | 2017-03-03T01:43:56.000+0000 |
| Updated | 2018-02-28T19:55:55.000+0000 |
Description
Objective-C supports lightweight generics. These can cause issues when used in conjunction with parameterized classes.
Simplified example from Dropbox Objective-C SDK
@interface DBStoneValidators <T> : NSObject
+ (void (^_Nonnull)(NSArray<T> * _Nonnull))arrayValidator:(NSNumber * _Nullable)minItems
maxItems:(NSNumber * _Nullable)maxItems
itemValidator:(void (^_Nullable)(T _Nonnull))itemValidator;
@end
This results in the following compiler error
[TRACE] /Users/jvennemann/Development/appc/googlevr/build/hyperloop/ios/js/objectivedropboxofficial/objectivedropboxofficial.m:67:20: error: no type or protocol named 'T'
[TRACE] return [^(NSArray<T> * arg0) {
[TRACE] ^
No comments