You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bork.swift:4:6: error: binary operator '+=' cannot be applied to operands of type 'String' and 'Character' text += currentChar! ~~~~ ^ ~~~~~~~~~~~~ bork.swift:4:6: note: overloads for '+=' exist with these partially matching parameter lists: (inout String, String) text += currentChar!
{{ ^}}
Attachment: Download
Environment
Apple Swift version 5.3.1 (swiftlang-1200.0.41 clang-1200.0.32.8)
Target: x86_64-apple-darwin20.1.0
Additional Detail from JIRA
md5: 0d7339ab6cc1a90a4e92433fdd62cf0a
Issue Description:
The following errorneous code is offending:
var text: String = ""
var currentChar: Character?
// ...
text += currentChar!
Expected: It should yield a type error for the incompatible += operator argument
currentChar
.The text was updated successfully, but these errors were encountered: