Created
August 29, 2019 12:01
-
-
Save pilky/de5fc653c009409181ab94e1928f377b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol Test { | |
var foo: String { get set } | |
func updateFoo() | |
} | |
extension Test where Self: NSObject { | |
func updateFoo() { | |
self.foo = "Bar" // <- Error: Cannot assign to property: 'self' is immutable | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment