Skip to content

Commit 8dcad45

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 92189c6 commit 8dcad45

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
@@ -635,7 +635,7 @@ ERROR(reserved_member_name,none,
635635

636636
ERROR(invalid_redecl,none,"invalid redeclaration of %0", (DeclName))
637637
WARNING(invalid_redecl_swift5_warning,none,
638-
"redeclaration of %0 is deprecated and will be illegal in Swift 5",
638+
"redeclaration of %0 is deprecated and will be an error in Swift 5",
639639
(DeclName))
640640

641641
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)