Swift: Unexpected error when initializing array of tuples using initializer syntax
| Originator: | sw | ||
| Number: | rdar://17224647 | Date Originated: | 08-Jun-2014 09:29 PM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: Using the Type[]() syntax to initialize an array of tuples gives an unexpected error in Xcode. Steps to Reproduce: 1. Open Xcode 6.0 2. Start a new Playground 3. Paste in the following code: var array1: (String, Int)[] = [] var array2 = (String, Int)[]() typealias a3ElementType = (String, Int) var array3 = a3ElementType[]() Expected Results: All three attempts to initialize an empty array of (String, Int) tuples succeed. Actual Results: The attempted initialization of array2 fails. Xcode shows the error "Expected member name or constructor call after type name" Regression: n/a Notes:
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!