[SR-10548] "use of extraneous '&'" when trying to +=
an Int? subscript
#52948
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
type checker
Area → compiler: Semantic analysis
Environment
Used Apple Swift version 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.4)
Additional Detail from JIRA
md5: cbe23b6cafadd8bae7967e536b1c7533
Issue Description:
The following code invokes the diagnostic "use of extraneous '&'". The compiler offers a fix-it that deletes the variable name from the subscript, leaving just the subscript operator left.
Expected:
Some error relating to the fact that we're trying to use `+=` on an `Int?`
The text was updated successfully, but these errors were encountered: