Swift: grammar edge case?

Originator:garth
Number:rdar://24399089 Date Originated:28-Jan-2016 03:30 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 7.3 beta 7D111g
Classification:Other Bug Reproducible:Always
 
The Swift parser doesn’t seem to like this line:

var foo = [Int -> Int]()

The error is “Expected ‘;’ separator”. This version is OK, however:

var foo: [Int -> Int] = []

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!