Struct method, even if not specified as mutating, is allowed to update property values

In Swift,

struct employeeStruct {
  var salary=50000.0 
  func giveRaise(amount:Double) { salary+=amount }
}

gives a “left side of mutating operator isn’t mutable: ‘self’ is immutable” error in Swift because structure methods that update property values have to be declared as mutating.

In Silver, the compiler doesn’t complain.

Thanks, logged as bugs://80631

bugs://80631 got closed with status fixed.