Fix-it cannot tell apart multiple instances of the same identifier in the same line
Originator: | an00na | ||
Number: | rdar://31328491 | Date Originated: | 29-Mar-2017 03:17 PM |
Status: | Open | Resolved: | |
Product: | Developer Tools | Product Version: | 8.3 |
Classification: | Other Bug | Reproducible: | Always |
Summary: For the following line of code it will endlessly fix the 1st instance of kCTFontNameAttribute by endlessly casting it to String while the real issue remaining is the 2nd instance of kCTFontNameAttribute needing casting. UIFontDescriptor(fontAttributes: [(kCTFontNameAttribute as String) as String: "AppleColorEmoji"]).matchingFontDescriptors(withMandatoryKeys: [kCTFontNameAttribute]) --- Update --- Wait, even after I manually fit it by casting the 2nd kCTFontNameAttribute to String Xcode still insist that " 'String' is not implicitly convertible to 'String'; did you mean to use 'as' to explicitly convert?". So the issue is deeper that I originally thought. Since I cannot come up with a proper title I'll leave the original title here. --- Steps to Reproduce: 1. Run sample playground. 2. Follow Fix-it. Code: https://cloudup.com/cTYyQ0GPtyC
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!