Swift curried function declaration implicitly labels arguments
| Originator: | dvoss.cynergy | ||
| Number: | rdar://17203378 | Date Originated: | 06-Jun-2014 12:02 PM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | |
| Classification: | Other Bug | Reproducible: |
Summary:
The function declaration form that generates a curried function erroneously applied argument labels to the resulting function.
Steps to Reproduce:
Enter this example into the Playground from the Swift book:
func addTwoNumbers(a:Int)(b:Int) -> Int {
return a + b
}
addTwoNumbers(4)(5)
Expected Results:
Should return 9
Actual Results:
Gives an error.
missing argument label 'b:' in call
addTwoNumbers(4)(5)
^
b:
Version:
Version 6.0 (6A215l)
Notes:
Configuration:
Attachments:
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!