You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix <rdar://problem/27384685> QoI: Poor diagnostic when assigning a value to a method
We previously said:
x.method = 1 // error: cannot assign to property: 'x' is immutable
we now say:
error: cannot assign to property: 'method' is a method
(b ? x : z.t).mutatingfunc() // expected-error {{cannot use mutating member on immutable value: result of conditional operator '? :' is never mutable}}
565
565
}
566
+
567
+
568
+
569
+
// <rdar://problem/27384685> QoI: Poor diagnostic when assigning a value to a method
570
+
func f(a :FooClass, b :LetStructMembers){
571
+
a.baz =1 // expected-error {{cannot assign to property: 'baz' is a method}}
572
+
b.f =42 // expected-error {{cannot assign to property: 'f' is a method}}
0 commit comments