[ 
https://issues.apache.org/jira/browse/THRIFT-3545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15103849#comment-15103849
 ] 

ASF GitHub Bot commented on THRIFT-3545:
----------------------------------------

Github user kdubb commented on the pull request:

    https://github.com/apache/thrift/pull/790#issuecomment-172362021
  
    These do work with nested types so my hunch was wrong on that but with the 
current code (including your PR) it now has awkward extra semi-colons; so my 
munch was somewhat correct that they appear unnecessary
    
    The NSSet missing a single brace was correct. I don't know why you switched 
it to the longer syntax when you could have just added a brace.
    
    It seems to me the issue was only to do with set literals and could have 
been solved with a single character change (adding a brace). Is there some 
other place I am missing where semi-colons are not added? If so I cannot seem 
to find it. 
    
    Currently as generated...
    ```objc
      NSDictionary<NSString *, NSString *> * tmp0 = @{@"new": @"world"};
      MapConst = @{@"hello": tmp0};
    ;
    
      NSSet<NSString *> * tmp1 = [[NSSet alloc] initWithArray:@[@"hello"]];
      SetConst = [[NSSet alloc] initWithArray:@[tmp1]];
    ;
    
      NSArray<NSString *> * tmp2 = @[@"hello"];
      ArrayConst = @[tmp2];
    ;
    ```


> Container type literals do not compile
> --------------------------------------
>
>                 Key: THRIFT-3545
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3545
>             Project: Thrift
>          Issue Type: Bug
>          Components: Cocoa - Compiler
>    Affects Versions: 1.0
>            Reporter: Christopher Rogers
>            Assignee: Christopher Rogers
>             Fix For: 1.0
>
>
> Default values and constants of container type (array, dictionary, and set) 
> do not compile. Semicolons are missing, and sets are missing an opening 
> square bracket.
> I will provide a patch/pull request for this issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to