[SR-10775] Mutating method in protocol extension always requires variable to be var
#53165
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Attachment: Download
Environment
Apple Swift version 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.5)
Target: x86_64-apple-darwin18.6.0
Additional Detail from JIRA
md5: ab0a323b49b55ccc543bf96676de562c
duplicates:
var
declaration of class variablesIssue Description:
Consider the following code:
The compiler complains “Cannot use mutating member on immutable value: 'object' is a 'let’ constant” even though
object
is clearly a reference type where everything is mutable.The text was updated successfully, but these errors were encountered: