You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: branches/tensorflow-next/test/ClangImporter/objc_parse.swift
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -370,13 +370,13 @@ class ProtocolAdopter2 : FooProto {
370
370
set{ /* do nothing! */ }
371
371
}
372
372
}
373
-
classProtocolAdopterBad1:FooProto{ // expected-error {{type 'ProtocolAdopterBad1' does not conform to protocol 'FooProto'}}
373
+
classProtocolAdopterBad1:FooProto{ // expected-error {{type 'ProtocolAdopterBad1' does not conform to protocol 'FooProto'}} expected-note {{do you want to add protocol stubs?}}
374
374
@objcvarbar:Int=0 // expected-note {{candidate has non-matching type 'Int'}}
375
375
}
376
-
classProtocolAdopterBad2:FooProto{ // expected-error {{type 'ProtocolAdopterBad2' does not conform to protocol 'FooProto'}}
376
+
classProtocolAdopterBad2:FooProto{ // expected-error {{type 'ProtocolAdopterBad2' does not conform to protocol 'FooProto'}} expected-note {{do you want to add protocol stubs?}}
377
377
letbar:CInt=0 // expected-note {{candidate is not settable, but protocol requires it}}
378
378
}
379
-
classProtocolAdopterBad3:FooProto{ // expected-error {{type 'ProtocolAdopterBad3' does not conform to protocol 'FooProto'}}
379
+
classProtocolAdopterBad3:FooProto{ // expected-error {{type 'ProtocolAdopterBad3' does not conform to protocol 'FooProto'}} expected-note {{do you want to add protocol stubs?}}
380
380
varbar:CInt{ // expected-note {{candidate is not settable, but protocol requires it}}
Copy file name to clipboardExpand all lines: branches/tensorflow-next/test/Constraints/invalid_stdlib_2.swift
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
// RUN: %target-typecheck-verify-swift
2
2
3
-
classDictionary<K, V>:ExpressibleByDictionaryLiteral{ // expected-error {{type 'Dictionary<K, V>' does not conform to protocol 'ExpressibleByDictionaryLiteral'}}
3
+
classDictionary<K, V>:ExpressibleByDictionaryLiteral{ // expected-error {{type 'Dictionary<K, V>' does not conform to protocol 'ExpressibleByDictionaryLiteral'}} expected-note {{do you want to add protocol stubs?}}
4
4
typealiasKey=K
5
5
typealiasValue=V
6
6
init(dictionaryLiteral xs:(K)...){} // expected-note {{candidate has non-matching type '(dictionaryLiteral: (K)...)'}}
Copy file name to clipboardExpand all lines: branches/tensorflow-next/test/Generics/inheritance.swift
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -56,10 +56,10 @@ func testGenericInherit() {
56
56
57
57
58
58
structSS<T>:T{} // expected-error{{inheritance from non-protocol type 'T'}}
59
-
enumSE<T>:T{case X } // expected-error{{raw type 'T' is not expressible by a string, integer, or floating-point literal}} // expected-error {{SE<T>' declares raw type 'T', but does not conform to RawRepresentable and conformance could not be synthesized}} expected-error{{RawRepresentable conformance cannot be synthesized because raw type 'T' is not Equatable}}
59
+
enumSE<T>:T{case X } // expected-error{{raw type 'T' is not expressible by a string, integer, or floating-point literal}} // expected-error {{SE<T>' declares raw type 'T', but does not conform to RawRepresentable and conformance could not be synthesized}} expected-error{{RawRepresentable conformance cannot be synthesized because raw type 'T' is not Equatable}} expected-note {{do you want to add protocol stubs?}}
60
60
61
61
// Also need Equatable for init?(RawValue)
62
-
enumSE2<T :ExpressibleByIntegerLiteral>
62
+
enumSE2<T :ExpressibleByIntegerLiteral> // expected-note {{do you want to add protocol stubs?}}
63
63
:T // expected-error {{'SE2<T>' declares raw type 'T', but does not conform to RawRepresentable and conformance could not be synthesized}} expected-error{{RawRepresentable conformance cannot be synthesized because raw type 'T' is not Equatable}}
enumEnumWithInheritance3:FooClass{case X } // expected-error {{raw type 'FooClass' is not expressible by a string, integer, or floating-point literal}}
120
+
enumEnumWithInheritance3:FooClass{case X } // expected-error {{raw type 'FooClass' is not expressible by a string, integer, or floating-point literal}} expected-note {{do you want to add protocol stubs?}}
121
121
// expected-error@-1{{'EnumWithInheritance3' declares raw type 'FooClass', but does not conform to RawRepresentable and conformance could not be synthesized}}
122
122
// expected-error@-2{{RawRepresentable conformance cannot be synthesized because raw type 'FooClass' is not Equatable}}
enumEnumWithInheritance4:FooClass,FooProtocol{case X } // expected-error {{raw type 'FooClass' is not expressible by a string, integer, or floating-point literal}}
126
+
enumEnumWithInheritance4:FooClass,FooProtocol{case X } // expected-error {{raw type 'FooClass' is not expressible by a string, integer, or floating-point literal}} expected-note {{do you want to add protocol stubs?}}
127
127
// expected-error@-1{{'EnumWithInheritance4' declares raw type 'FooClass', but does not conform to RawRepresentable and conformance could not be synthesized}}
128
128
// expected-error@-2{{RawRepresentable conformance cannot be synthesized because raw type 'FooClass' is not Equatable}}
enumEnumWithInheritance5:FooClass,BarClass{case X } // expected-error {{raw type 'FooClass' is not expressible by a string, integer, or floating-point literal}} expected-error {{multiple enum raw types 'FooClass' and 'BarClass'}}
132
+
enumEnumWithInheritance5:FooClass,BarClass{case X } // expected-error {{raw type 'FooClass' is not expressible by a string, integer, or floating-point literal}} expected-error {{multiple enum raw types 'FooClass' and 'BarClass'}} expected-note {{do you want to add protocol stubs?}}
133
133
// expected-error@-1{{'EnumWithInheritance5' declares raw type 'FooClass', but does not conform to RawRepresentable and conformance could not be synthesized}}
134
134
// expected-error@-2{{RawRepresentable conformance cannot be synthesized because raw type 'FooClass' is not Equatable}}
Copy file name to clipboardExpand all lines: branches/tensorflow-next/test/Parse/enum.swift
+14-14Lines changed: 14 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -130,7 +130,7 @@ enum Recovery6 {
130
130
case Tusk, // expected-error {{expected pattern}}
131
131
} // expected-error {{expected identifier after comma in enum 'case' declaration}}
132
132
133
-
enumRawTypeEmpty:Int{} // expected-error {{an enum with no cases cannot declare a raw type}}
133
+
enumRawTypeEmpty:Int{} // expected-error {{an enum with no cases cannot declare a raw type}} expected-note {{do you want to add protocol stubs?}}
134
134
// expected-error@-1{{'RawTypeEmpty' declares raw type 'Int', but does not conform to RawRepresentable and conformance could not be synthesized}}
135
135
136
136
enumRaw:Int{
@@ -146,7 +146,7 @@ enum RawTypeNotFirst : RawTypeNotFirstProtocol, Int { // expected-error {{raw ty
146
146
case E
147
147
}
148
148
149
-
enumExpressibleByRawTypeNotLiteral:Array<Int>{ // expected-error {{raw type 'Array<Int>' is not expressible by a string, integer, or floating-point literal}}
149
+
enumExpressibleByRawTypeNotLiteral:Array<Int>{ // expected-error {{raw type 'Array<Int>' is not expressible by a string, integer, or floating-point literal}} expected-note {{do you want to add protocol stubs?}}
150
150
// expected-error@-1{{'ExpressibleByRawTypeNotLiteral' declares raw type 'Array<Int>', but does not conform to RawRepresentable and conformance could not be synthesized}}
enumExpressibleByRawTypeNotIntegerLiteral:ExpressibleByFloatLiteralOnly{ // expected-error {{'ExpressibleByRawTypeNotIntegerLiteral' declares raw type 'ExpressibleByFloatLiteralOnly', but does not conform to RawRepresentable and conformance could not be synthesized}} expected-error {{RawRepresentable conformance cannot be synthesized because raw type 'ExpressibleByFloatLiteralOnly' is not Equatable}}
173
+
enumExpressibleByRawTypeNotIntegerLiteral:ExpressibleByFloatLiteralOnly{ // expected-error {{'ExpressibleByRawTypeNotIntegerLiteral' declares raw type 'ExpressibleByFloatLiteralOnly', but does not conform to RawRepresentable and conformance could not be synthesized}} expected-error {{RawRepresentable conformance cannot be synthesized because raw type 'ExpressibleByFloatLiteralOnly' is not Equatable}} expected-note {{do you want to add protocol stubs?}}
174
174
case Everett // expected-error {{enum cases require explicit raw values when the raw type is not expressible by integer or string literal}}
175
175
case Flanders
176
176
}
@@ -184,13 +184,13 @@ enum RawTypeWithNegativeValues : Int {
184
184
case AutoIncAcrossZero =-1, Zero, One
185
185
}
186
186
187
-
enumRawTypeWithUnicodeScalarValues:UnicodeScalar{ // expected-error {{'RawTypeWithUnicodeScalarValues' declares raw type 'UnicodeScalar' (aka 'Unicode.Scalar'), but does not conform to RawRepresentable and conformance could not be synthesized}}
187
+
enumRawTypeWithUnicodeScalarValues:UnicodeScalar{ // expected-error {{'RawTypeWithUnicodeScalarValues' declares raw type 'UnicodeScalar' (aka 'Unicode.Scalar'), but does not conform to RawRepresentable and conformance could not be synthesized}} expected-note {{do you want to add protocol stubs?}}
188
188
case Kearney ="K"
189
189
case Lovejoy // expected-error {{enum cases require explicit raw values when the raw type is not expressible by integer or string literal}}
190
190
case Marshall ="M"
191
191
}
192
192
193
-
enumRawTypeWithCharacterValues:Character{ // expected-error {{'RawTypeWithCharacterValues' declares raw type 'Character', but does not conform to RawRepresentable and conformance could not be synthesized}}
193
+
enumRawTypeWithCharacterValues:Character{ // expected-error {{'RawTypeWithCharacterValues' declares raw type 'Character', but does not conform to RawRepresentable and conformance could not be synthesized}} expected-note {{do you want to add protocol stubs?}}
194
194
case First ="い"
195
195
case Second // expected-error {{enum cases require explicit raw values when the raw type is not expressible by integer or string literal}}
196
196
case Third ="は"
@@ -203,11 +203,11 @@ enum RawTypeWithCharacterValues_Correct : Character {
203
203
case Fourth ="\u{1F3F4}\u{E0067}\u{E0062}\u{E0065}\u{E006E}\u{E0067}\u{E007F}" // ok
204
204
}
205
205
206
-
enumRawTypeWithCharacterValues_Error1:Character{ // expected-error {{'RawTypeWithCharacterValues_Error1' declares raw type 'Character', but does not conform to RawRepresentable and conformance could not be synthesized}}
206
+
enumRawTypeWithCharacterValues_Error1:Character{ // expected-error {{'RawTypeWithCharacterValues_Error1' declares raw type 'Character', but does not conform to RawRepresentable and conformance could not be synthesized}} expected-note {{do you want to add protocol stubs?}}
207
207
case First ="abc" // expected-error {{cannot convert value of type 'String' to raw type 'Character'}}
208
208
}
209
209
210
-
enumRawTypeWithFloatValues:Float{ // expected-error {{'RawTypeWithFloatValues' declares raw type 'Float', but does not conform to RawRepresentable and conformance could not be synthesized}}
210
+
enumRawTypeWithFloatValues:Float{ // expected-error {{'RawTypeWithFloatValues' declares raw type 'Float', but does not conform to RawRepresentable and conformance could not be synthesized}} expected-note {{do you want to add protocol stubs?}}
211
211
case Northrup =1.5
212
212
case Overton // expected-error {{enum case must declare a raw value when the preceding raw value is not an integer}}
213
213
case Pettygrove =2.25
@@ -318,12 +318,12 @@ enum NonliteralRawValue : Int {
318
318
case Yeon =100+20+3 // expected-error {{raw value for enum case must be a literal}}
319
319
}
320
320
321
-
enumRawTypeWithPayload:Int{ // expected-error {{'RawTypeWithPayload' declares raw type 'Int', but does not conform to RawRepresentable and conformance could not be synthesized}} expected-note {{declared raw type 'Int' here}} expected-note {{declared raw type 'Int' here}}
321
+
enumRawTypeWithPayload:Int{ // expected-error {{'RawTypeWithPayload' declares raw type 'Int', but does not conform to RawRepresentable and conformance could not be synthesized}} expected-note {{declared raw type 'Int' here}} expected-note {{declared raw type 'Int' here}} expected-note {{do you want to add protocol stubs?}}
322
322
case Powell(Int) // expected-error {{enum with raw type cannot have cases with arguments}}
323
323
case Terwilliger(Int)=17 // expected-error {{enum with raw type cannot have cases with arguments}}
324
324
}
325
325
326
-
enumRawTypeMismatch:Int{ // expected-error {{'RawTypeMismatch' declares raw type 'Int', but does not conform to RawRepresentable and conformance could not be synthesized}}
326
+
enumRawTypeMismatch:Int{ // expected-error {{'RawTypeMismatch' declares raw type 'Int', but does not conform to RawRepresentable and conformance could not be synthesized}} expected-note {{do you want to add protocol stubs?}}
327
327
case Barbur ="foo" // expected-error {{}}
328
328
}
329
329
@@ -343,12 +343,12 @@ enum DuplicateMembers3 {
343
343
case Foo(Int) // expected-error {{invalid redeclaration of 'Foo'}}
344
344
}
345
345
346
-
enumDuplicateMembers4:Int{ // expected-error {{'DuplicateMembers4' declares raw type 'Int', but does not conform to RawRepresentable and conformance could not be synthesized}}
346
+
enumDuplicateMembers4:Int{ // expected-error {{'DuplicateMembers4' declares raw type 'Int', but does not conform to RawRepresentable and conformance could not be synthesized}} expected-note {{do you want to add protocol stubs?}}
347
347
case Foo =1 // expected-note {{'Foo' previously declared here}}
348
348
case Foo =2 // expected-error {{invalid redeclaration of 'Foo'}}
349
349
}
350
350
351
-
enumDuplicateMembers5:Int{ // expected-error {{'DuplicateMembers5' declares raw type 'Int', but does not conform to RawRepresentable and conformance could not be synthesized}}
351
+
enumDuplicateMembers5:Int{ // expected-error {{'DuplicateMembers5' declares raw type 'Int', but does not conform to RawRepresentable and conformance could not be synthesized}} expected-note {{do you want to add protocol stubs?}}
352
352
case Foo =1 // expected-note {{'Foo' previously declared here}}
353
353
case Foo =1+1 // expected-error {{invalid redeclaration of 'Foo'}} expected-error {{raw value for enum case must be a literal}}
354
354
}
@@ -359,7 +359,7 @@ enum DuplicateMembers6 {
359
359
case Foo // expected-error {{invalid redeclaration of 'Foo'}}
360
360
}
361
361
362
-
enumDuplicateMembers7:String{ // expected-error {{'DuplicateMembers7' declares raw type 'String', but does not conform to RawRepresentable and conformance could not be synthesized}}
362
+
enumDuplicateMembers7:String{ // expected-error {{'DuplicateMembers7' declares raw type 'String', but does not conform to RawRepresentable and conformance could not be synthesized}} expected-note {{do you want to add protocol stubs?}}
363
363
case Foo // expected-note {{'Foo' previously declared here}}
364
364
case Foo ="Bar" // expected-error {{invalid redeclaration of 'Foo'}}
case B =0 // expected-error {{raw value for enum case is not unique}}
412
412
}
413
413
414
-
enumManyLiteralB:ManyLiteralable{ // expected-error {{'ManyLiteralB' declares raw type 'ManyLiteralable', but does not conform to RawRepresentable and conformance could not be synthesized}}
414
+
enumManyLiteralB:ManyLiteralable{ // expected-error {{'ManyLiteralB' declares raw type 'ManyLiteralable', but does not conform to RawRepresentable and conformance could not be synthesized}} expected-note {{do you want to add protocol stubs?}}
415
415
case A ="abc"
416
416
case B // expected-error {{enum case must declare a raw value when the preceding raw value is not an integer}}
enumfoo:String{ // expected-error {{'foo' declares raw type 'String', but does not conform to RawRepresentable and conformance could not be synthesized}}
443
+
enumfoo:String{ // expected-error {{'foo' declares raw type 'String', but does not conform to RawRepresentable and conformance could not be synthesized}} expected-note {{do you want to add protocol stubs?}}
444
444
case bar =nil // expected-error {{cannot convert 'nil' to raw type 'String'}}
0 commit comments