[Sema] "will be illegal" -> "will be an error" in diagnostics.

"illegal" is an overloaded word and can distress people who aren't familiar with
the usage as being illegal with respect to the language definition, not the
actual law.
This commit is contained in:
Huon Wilson
2018-06-21 17:07:32 +10:00
parent 92189c6079
commit 8dcad45d82
2 changed files with 4 additions and 4 deletions

View File

@@ -635,7 +635,7 @@ ERROR(reserved_member_name,none,
ERROR(invalid_redecl,none,"invalid redeclaration of %0", (DeclName))
WARNING(invalid_redecl_swift5_warning,none,
"redeclaration of %0 is deprecated and will be illegal in Swift 5",
"redeclaration of %0 is deprecated and will be an error in Swift 5",
(DeclName))
NOTE(invalid_redecl_prev,none,

View File

@@ -9,10 +9,10 @@ extension SR7251 {
// expected-note@-1 {{previously declared here}}
// expected-note@-2 {{previously declared here}}
struct i {} // expected-warning {{redeclaration of 'i' is deprecated and will be illegal in Swift 5}}
typealias i = Int // expected-warning {{redeclaration of 'i' is deprecated and will be illegal in Swift 5}}
struct i {} // expected-warning {{redeclaration of 'i' is deprecated and will be an error in Swift 5}}
typealias i = Int // expected-warning {{redeclaration of 'i' is deprecated and will be an error in Swift 5}}
static var j: Int { return 0 } // expected-warning {{redeclaration of 'j' is deprecated and will be illegal in Swift 5}}
static var j: Int { return 0 } // expected-warning {{redeclaration of 'j' is deprecated and will be an error in Swift 5}}
struct k {} // expected-error{{invalid redeclaration of 'k'}}
}