Xcode-beta (7A120f): Code-completion don't show all the variants for defaul parameters
| Originator: | konstantin.koval1 | ||
| Number: | rdar://21418601 | Date Originated: | 17-Jun-2015 12:44 PM |
| Status: | Behaves correctly | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode-beta (7A120f) |
| Classification: | Enhancement | Reproducible: | Always |
Summary:
Xcode should show all the possible variants of using a function with default parameters
Steps to Reproduce:
One attached playground file with code.
Start typing “doWor” get Xcode code suggestion
Example:
func doWorkWellNil(a: Int, b: Int? = nil) { }
Xcode code completion shows 2 usage suggestion //
doWorkWellNil(a: Int)
doWorkWellNil(a: Int, b: Int?)
func doWork3Params(a: Int, b: Int? = nil, c: Int = 10) { }
Xcode still shows 2 suggestion instead of 4
doWork3Params(a: Int)
doWork3Params(a: Int, b: Int?, c: Int)
Expected Results:
It should show all the possible usage variants
func doWork3Params(a: Int, b: Int? = nil, c: Int = 10) { }
Xcode should show 4 use suggestion:
doWork3Params(a: Int)
doWork3Params(a: Int, b: Int?)
doWork3Params(a: Int, c: Int)
doWork3Params(a: Int, b: Int?, c: Int)
Actual Results:
Xcode should shows only 2 suggestions:
doWork3Params(a: Int)
doWork3Params(a: Int, b: Int?, c: Int)
Notes:
See the attachment with code and screenshots
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!