Auto completion for methods using type inference
| Originator: | pointum | ||
| Number: | rdar://25519661 | Date Originated: | 03-Apr-2016 |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | |
| Classification: | Reproducible: |
Summary: Swift can infer type and accept ".method" instead of "Class.method". E.g. instead of this window.font = NSFont.systemFontOfSize(0) you can use this: window.font = .systemFontOfSize(0) // Type inferred Xcode, however, does not suggest code completion in this case, which is the problem. Steps to Reproduce: 1. Create a new playground 2. Paste this text import Cocoa let color: NSColor = 3. Type a dot at the end of the second line: let color: NSColor = . Expected Results: A code completion list should show up for inferred NSColor type methods. Actual Results: No code completion shows up. Version: Xcode Version 7.3 (7D175) OS X 10.11.4 (15E65) Notes: Code autocompletion would make it easier to use method type inference already possible in Swift (similar to the use of Enums).
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!