Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trailing comma in key-value list is legal #153

Closed
JanX2 opened this issue Dec 13, 2015 · 1 comment
Closed

Trailing comma in key-value list is legal #153

JanX2 opened this issue Dec 13, 2015 · 1 comment

Comments

@JanX2
Copy link

JanX2 commented Dec 13, 2015

The trailing comma in a key-value list for initializing a dictionary in modern ObjC is legal:

NSDictionary *undoRootDict = @{
                               UndoFileVersionKey : @(kUndoFileCurrentVersionNumber),
                               UndoFileUsedSymbolicLinksKey : @(WantSymbolicLink),
                               UndoFileProcessedPairsKey : processedPairs,
                               };

iSwift only allows this construct when the trailing comma is deleted:

NSDictionary *undoRootDict = @{
                               UndoFileVersionKey : @(kUndoFileCurrentVersionNumber),
                               UndoFileUsedSymbolicLinksKey : @(WantSymbolicLink),
                               UndoFileProcessedPairsKey : processedPairs // <- here!
                               };
@drkameleon
Copy link
Collaborator

Issue fixed as of the upcoming 2.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants