Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24450] Hyperloop: iOS - Invalid wrapper code generated for blocks within generic classes

GitHub Issuen/a
TypeBug
PriorityMedium
StatusOpen
ResolutionUnresolved
Affected Version/sHyperloop 2.0.1
Fix Version/sn/a
ComponentsHyperloop, iOS
Labelsn/a
ReporterJan Vennemann
AssigneeUnknown
Created2017-03-03T01:43:56.000+0000
Updated2018-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]                           ^

Comments

No comments

JSON Source