Open
Description
Description
We could offer to declare a mutable var x = x
copy above the failing expression below.
Reproduction
func f(x: Int) {
x = 3
x += 3
}
Expected behavior
Fix-it to declare a variable.
Environment
Swift version 6.2-dev (LLVM 736ebbfa5fe3371, Swift d033eec)
Additional information
No response
Metadata
Metadata
Assignees
Labels
A deviation from expected or documented behavior. Also: expected but undesirable behavior.The Swift compiler itselfBug: Diagnostics Quality of ImplementationFeature: expressionsFeature: diagnostic fix-itsFeature → declarations: function parametersFeature: storage mutabilityArea → compiler: Semantic analysis