[SR-2654] NSAttributedString import creates indistinguishable candidates due to automatic defaulting #45259
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
type checker
Area → compiler: Semantic analysis
Environment
Swift 3, Xcode 8
Additional Detail from JIRA
md5: ae4e7606fcf837355a888c76b7d04cd4
relates to:
Issue Description:
Autodefaulting makes these indistinguishable:
initWithHTML:documentAttributes:
initWithHTML:options:documentAttributes:
Error: "Playground execution failed: error: MyPlayground.playground:34:18: error: ambiguous use of 'init(HTML:documentAttributes:)'
let attributed = NSAttributedString(HTML: data, documentAttributes: nil)"
Workaround: add options with manual [:] argument.
Long term solution: probably omitting the options-free API
The text was updated successfully, but these errors were encountered: