[ https://issues.apache.org/jira/browse/THRIFT-3401?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14979303#comment-14979303 ]
ASF GitHub Bot commented on THRIFT-3401: ---------------------------------------- GitHub user kdubb opened a pull request: https://github.com/apache/thrift/pull/665 THRIFT-3401 - Fix code generation for nested containers You can merge this pull request into a Git repository by running: $ git pull https://github.com/reTXT/thrift THRIFT-3401 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/thrift/pull/665.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #665 ---- commit ce3a4bfd0708b6c6b3a9503fa08f82d9d9ca92d7 Author: Kevin Wooten <ke...@wooten.com> Date: 2015-10-28T21:43:22Z Fix code generation for nested containers ---- > Nested collections emit Objective-C code that cannot compile > ------------------------------------------------------------ > > Key: THRIFT-3401 > URL: https://issues.apache.org/jira/browse/THRIFT-3401 > Project: Thrift > Issue Type: Bug > Components: Cocoa - Compiler > Affects Versions: 1.0 > Environment: OS X 10.9 and 10.10 > Reporter: Steve Yegge > Priority: Critical > Original Estimate: 72h > Remaining Estimate: 72h > > Nested Thrift collections produce nested generics in Objective-C. > Unfortunately, Objective-C generics do not appear to support type nesting. > For instance, > 1: list<list<string>> foo > generates an Objective-C declaration like this > @property (strong, nonatomic) NSMutableArray<NSArray<NSString *>> * foo; > which results in an XCode compile error: Type argument 'NSArray<NSString *>' > is neither an Objective-C object nor a block type > The only workaround is to edit the generated code to remove the nested type > specifiers. > Until Objective-C supports nesting generic types, the Thrift cocoa compiler > should limit the type nesting to at most one level -- NSMutableArray<NSArray> > is legal, for instance. Alternately, an easier solution might be to add a > flag that disables the generation of generic types for cocoa. -- This message was sent by Atlassian JIRA (v6.3.4#6332)