Skip to content

Commit 11b1116

Browse files
committed
Sema: Make "@retroactive attribute does not apply" a warning.
Follow up to #71302. Resolves rdar://122590301
1 parent 5e92df0 commit 11b1116

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2544,9 +2544,9 @@ ERROR(retroactive_not_in_extension_inheritance_clause,none,
25442544
"'retroactive' attribute only applies in inheritance clauses in "
25452545
"extensions", ())
25462546

2547-
ERROR(retroactive_attr_does_not_apply,none,
2548-
"'retroactive' attribute does not apply; %0 is declared in this module",
2549-
(Identifier))
2547+
WARNING(retroactive_attr_does_not_apply,none,
2548+
"'retroactive' attribute does not apply; %0 is declared in this module",
2549+
(Identifier))
25502550

25512551
WARNING(extension_retroactive_conformance,none,
25522552
"extension declares a conformance of imported type %0 to imported "

test/Sema/extension_retroactive_conformances.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ extension Sample1: ClientProtocol {}
6565

6666
struct Sample7: @retroactive SampleProtocol1 {} // expected-error {{'retroactive' attribute only applies in inheritance clauses in extensions}}
6767

68-
extension Sample7: @retroactive ClientProtocol {} // expected-error {{'retroactive' attribute does not apply; 'Sample7' is declared in this module}}
68+
extension Sample7: @retroactive ClientProtocol {} // expected-warning {{'retroactive' attribute does not apply; 'Sample7' is declared in this module}}
6969

70-
extension Int: @retroactive ClientProtocol {} // expected-error {{'retroactive' attribute does not apply; 'ClientProtocol' is declared in this module}}
70+
extension Int: @retroactive ClientProtocol {} // expected-warning {{'retroactive' attribute does not apply; 'ClientProtocol' is declared in this module}}
7171

7272
func f(_ x: @retroactive Int) {} // expected-error {{'retroactive' attribute only applies in inheritance clauses in extensions}}
7373

0 commit comments

Comments
 (0)