Swift tuples (all sequence/collection literals and anywhere else with a comma-delimited list) should allow commas after last items
| Originator: | isaac.greenspan | ||
| Number: | rdar://21894075 | Date Originated: | 19-Jul-2015 10:05 PM |
| Status: | Closed (dupe of 17260244) | Resolved: | |
| Product: | Developer Tools | Product Version: | |
| Classification: | UI/Usability | Reproducible: | Not Applicable |
Summary: Any place in Swift where thereβs a comma-delimited list should allow a comma after the last item. Steps to Reproduce: In Xcode 6.4/Swift 1.2 as well as Xcode 7b3/Swift 2.0, entering: var goatTuple = ( "π", "π", "π" ) works while var goatTuple = ( "π", "π", "π", ) produces an error. Expected Results: Both above examples should work. Commas after last items in any comma-delimited list should not produce errors. Actual Results: Commas after last items in at least some instances of comma-delimited lists (tuples) produce errors. I havenβt checked to see whether trailing commas like this are permitted anywhere.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!