mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Diagnostics] s/may/must/ in 'may not be used on subscript parameters'
This commit is contained in:
@@ -2192,7 +2192,7 @@ ERROR(attr_only_on_parameters,none,
|
||||
ERROR(attr_not_on_variadic_parameters,none,
|
||||
"%0 must not be used on variadic parameters", (StringRef))
|
||||
ERROR(attr_not_on_subscript_parameters,none,
|
||||
"%0 may not be used on subscript parameters", (StringRef))
|
||||
"%0 must not be used on subscript parameters", (StringRef))
|
||||
|
||||
ERROR(override_final,none,
|
||||
"%0 overrides a 'final' %1", (DescriptiveDeclKind, DescriptiveDeclKind))
|
||||
|
||||
@@ -610,8 +610,8 @@ func f(a : FooClass, b : LetStructMembers) {
|
||||
class MutableSubscripts {
|
||||
var x : Int = 0
|
||||
|
||||
subscript(x: inout Int) -> () { x += 1 } // expected-error {{'inout' may not be used on subscript parameters}}
|
||||
subscript<T>(x: inout T) -> () { // expected-error {{'inout' may not be used on subscript parameters}}
|
||||
subscript(x: inout Int) -> () { x += 1 } // expected-error {{'inout' must not be used on subscript parameters}}
|
||||
subscript<T>(x: inout T) -> () { // expected-error {{'inout' must not be used on subscript parameters}}
|
||||
fatalError()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user