File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
test/decl/protocol/special/coding Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ class DecodableSuper : Decodable {
6363
6464// expected-note@+1 {{did you mean to override 'init(from:)'?}}{{+1:1-1=\noverride init(from decoder: Decoder) throws {\n <#code#>\n\}}}
6565class DecodableSubWithoutInitialValue : DecodableSuper { // expected-error {{class 'DecodableSubWithoutInitialValue' has no initializers}}
66+ // expected-warning{{'required' initializer 'init(from:)' must be provided by subclass of 'DecodableSuper'}}
6667 var value2 : Int // expected-note {{stored property 'value2' without initial value prevents synthesized initializers}}
6768}
6869
@@ -78,6 +79,7 @@ class CodableSuper : Codable {
7879
7980// expected-note@+1 {{did you mean to override 'init(from:)' and 'encode(to:)'?}}{{+1:1-1=\noverride init(from decoder: Decoder) throws {\n <#code#>\n\}\n\noverride func encode(to encoder: Encoder) throws {\n <#code#>\n\}}}
8081class CodableSubWithoutInitialValue : CodableSuper { // expected-error {{class 'CodableSubWithoutInitialValue' has no initializers}}
82+ // expected-warning{{'required' initializer 'init(from:)' must be provided by subclass of 'CodableSuper'; this is an error in Swift 6}}
8183 var value2 : Int // expected-note {{stored property 'value2' without initial value prevents synthesized initializers}}
8284}
8385
@@ -86,6 +88,7 @@ class CodableSubWithoutInitialValue : CodableSuper { // expected-error {{class '
8688//
8789// expected-note@+1 {{did you mean to override 'init(from:)'?}}{{+1:1-1=\noverride init(from decoder: Decoder) throws {\n <#code#>\n\}}}
8890class EncodableSubWithoutInitialValue : CodableSuper { // expected-error {{class 'EncodableSubWithoutInitialValue' has no initializers}}
91+ // expected-warning{{'required' initializer 'init(from:)' must be provided by subclass of 'CodableSuper'; this is an error in Swift 6}}
8992 var value2 : Int // expected-note {{stored property 'value2' without initial value prevents synthesized initializers}}
9093
9194 override func encode( to: Encoder ) throws { }
You can’t perform that action at this time.
0 commit comments