Mutating Function on Class Type (Possible bug?)

One thing I have wondered about related to this issue is why Swift does not allow writing:

class Foo {
  mutating func bar() {
    self = Foo()
  }
}
1 Like