Hey Steve Thanks for looking into this, we track all our issues in jira which can be found at [1]. If you wouldnt mind opening a bug report for this we can take a look at it and see what we can do, patches are also always welcome [2]
-Jake [1]: https://issues.apache.org/jira/browse/thrift [2]: https://thrift.apache.org/docs/HowToContribute On Wed, Oct 28, 2015 at 12:18 PM, Steve Yegge <[email protected]> wrote: > Hi folks, > > This is my first post, and I'm not sure about the protocol for bug > reporting. > > Objective-C generics apparently do not support nesting. E.g., adding this > line to any method: > > NSArray<NSArray<NSString *>> *myArray = [NSArray new]; > > Will result in XCode issuing the error: Type argument 'NSArray<NSString > *>' is neither an Objective-C object nor a block type > > The latest Thrift compiler (1.0.0-dev, pulled from head yesterday) > transforms something like this > > 1: list<list<string>> foo > > into an Objective-C declaration like this > > @property (strong, nonatomic) NSMutableArray<NSArray<NSString *>> * foo; > > which results in an XCode compile error like the one above. > > Until ObjC supports nested generics, I'd guess that the best solution would > be to limit the type conversion recursion to depth 1, yielding something > like so: > > @property (strong, nonatomic) NSMutableArray<NSArray> * foo; > > I haven't tested it, but I would assume this problem applies to any nested > collection types. >
