Skip to content

Commit be4c33d

Browse files
committed
[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.
1 parent 8199e8d commit be4c33d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ ERROR(reserved_member_name,none,
622622

623623
ERROR(invalid_redecl,none,"invalid redeclaration of %0", (DeclName))
624624
WARNING(invalid_redecl_swift5_warning,none,
625-
"redeclaration of %0 is deprecated and will be illegal in Swift 5",
625+
"redeclaration of %0 is deprecated and will be an error in Swift 5",
626626
(DeclName))
627627

628628
NOTE(invalid_redecl_prev,none,

test/decl/overload_swift4.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ extension SR7251 {
99
// expected-note@-1 {{previously declared here}}
1010
// expected-note@-2 {{previously declared here}}
1111

12-
struct i {} // expected-warning {{redeclaration of 'i' is deprecated and will be illegal in Swift 5}}
13-
typealias i = Int // expected-warning {{redeclaration of 'i' is deprecated and will be illegal in Swift 5}}
12+
struct i {} // expected-warning {{redeclaration of 'i' is deprecated and will be an error in Swift 5}}
13+
typealias i = Int // expected-warning {{redeclaration of 'i' is deprecated and will be an error in Swift 5}}
1414

15-
static var j: Int { return 0 } // expected-warning {{redeclaration of 'j' is deprecated and will be illegal in Swift 5}}
15+
static var j: Int { return 0 } // expected-warning {{redeclaration of 'j' is deprecated and will be an error in Swift 5}}
1616

1717
struct k {} // expected-error{{invalid redeclaration of 'k'}}
1818
}

0 commit comments

Comments
 (0)