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: test/Constraints/closures.swift
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -747,7 +747,7 @@ takesTwoInOut { _ in } // expected-error {{contextual closure type '(Int, inout
747
747
func f20371273(){
748
748
letx:[Int]=[1,2,3,4]
749
749
lety:UInt=4
750
-
_ = x.filter{($0 + y)>42} // expected-error {{'+' is unavailable}}
750
+
_ = x.filter{($0 + y)>42} // expected-error {{binary operator '+' cannot be applied to operands of type 'Int' and 'UInt'}} expected-note {{overloads for '+' exist with these partially matching parameter lists: (UInt, UInt), (Int, Int)}}
a += a + // expected-error {{binary operator '+=' cannot be applied to operands of type 'Int' and 'UInt32'}} expected-note {{overloads for '+=' exist}}
711
+
_ = a + b // expected-error {{binary operator '+' cannot be applied to operands of type 'Int' and 'UInt32'}} expected-note {{overloads for '+' exist with these partially matching parameter lists: (UInt32, UInt32), (Int, Int)}}
712
+
a += a + // expected-error {{binary operator '+' cannot be applied to operands of type 'Int' and 'UInt32'}} expected-note {{overloads for '+' exist with these partially matching parameter lists:}}
713
713
b
714
+
a += b // expected-error {{binary operator '+=' cannot be applied to operands of type 'Int' and 'UInt32'}} expected-note {{overloads for '+=' exist with these partially matching parameter lists: (inout UInt32, UInt32), (inout Int, Int)}}
714
715
}
715
716
716
717
func overloadSetResultType(_ a :Int, b :Int)->Int{
Copy file name to clipboardExpand all lines: test/Sema/substring_to_string_conversion_swift4.swift
-6Lines changed: 0 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -81,12 +81,6 @@ do {
81
81
// Substring-to-String via subscripting in a context expecting String
82
82
func takesString(_ s:String){}
83
83
84
-
func apply(_ fn:(String)->(), _ s:String){
85
-
fn(s[s.startIndex..<s.endIndex]) // expected-error{{subscripts returning String were obsoleted in Swift 4; explicitly construct a String from subscripted result}} {{6-6=String(}} {{34-34=)}}
86
-
let _:String=s[s.startIndex..<s.endIndex] // expected-error{{subscripts returning String were obsoleted in Swift 4; explicitly construct a String from subscripted result}} {{19-19=String(}} {{47-47=)}}
87
-
_ =s[s.startIndex..<s.endIndex]asString // expected-error{{subscripts returning String were obsoleted in Swift 4; explicitly construct a String from subscripted result}} {{7-7=String(}} {{35-35=)}}
Copy file name to clipboardExpand all lines: test/api-digester/Outputs/stability-stdlib-abi.swift.expected
+58-2Lines changed: 58 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -358,8 +358,6 @@ Struct _DropWhileSequence has generic signature change from <τ_0_0 where τ_0_0
358
358
Struct _DropWhileSequence has removed conformance to IteratorProtocol
359
359
Struct _DropWhileSequence has type witness type for Sequence.Iterator changing from _DropWhileSequence<τ_0_0> to DropWhileSequence<τ_0_0>.Iterator
360
360
Var Collection.lazy has been removed
361
-
Var Dictionary.keys has declared type change from LazyMapCollection<Dictionary<τ_0_0, τ_0_1>, τ_0_0> to LazyMapSequence<Dictionary<τ_0_0, τ_0_1>, τ_0_0>
362
-
Var Dictionary.values has declared type change from LazyMapCollection<Dictionary<τ_0_0, τ_0_1>, τ_0_1> to LazyMapSequence<Dictionary<τ_0_0, τ_0_1>, τ_0_1>
363
361
Var LazySequence._base has removed its setter
364
362
Var _DropWhileSequence._iterator has declared type change from τ_0_0 to τ_0_0.Iterator
365
363
Func Collection._preprocessingPass(_:) has been removed
@@ -544,3 +542,61 @@ Func _AbstractStringStorage.copy(with:) has been removed
544
542
Func _AbstractStringStorage.getOrComputeBreadcrumbs() has been removed
545
543
546
544
Func Sequence.reduce(into:_:) has parameter 0 changing from Default to Owned
545
+
546
+
Constructor String.Index.init(_codeUnitOffset:) has been removed (deprecated)
547
+
Constructor String.Index.init(_position:) has been removed (deprecated)
548
+
Constructor String.init(_:) has been removed (deprecated)
549
+
Constructor String.init(_:obsoletedInSwift4:) has been removed
550
+
Constructor _ExpressibleByColorLiteral.init(colorLiteralRed:green:blue:alpha:) has been removed (deprecated)
551
+
Func BinaryInteger.toIntMax() has been removed
552
+
Func Dictionary.filter(_:obsoletedInSwift4:) has been removed
553
+
Func FixedWidthInteger.unsafeAdding(_:) has been removed
554
+
Func FixedWidthInteger.unsafeDivided(by:) has been removed
555
+
Func FixedWidthInteger.unsafeMultiplied(by:) has been removed
556
+
Func FixedWidthInteger.unsafeSubtracting(_:) has been removed
557
+
Func FloatingPoint._fromBitPattern(_:) has been removed
558
+
Func FloatingPoint._toBitPattern() has been removed
559
+
Func FloatingPoint.abs(_:) has been removed (deprecated)
560
+
Func FloatingPoint.add(_:) has been removed
561
+
Func FloatingPoint.adding(_:) has been removed
562
+
Func FloatingPoint.divide(by:) has been removed
563
+
Func FloatingPoint.divided(by:) has been removed
564
+
Func FloatingPoint.multiplied(by:) has been removed
565
+
Func FloatingPoint.multiply(by:) has been removed
566
+
Func FloatingPoint.negated() has been removed
567
+
Func FloatingPoint.subtract(_:) has been removed
568
+
Func FloatingPoint.subtracting(_:) has been removed
569
+
Func Optional....(_:_:) has been removed
570
+
Func Optional...<(_:_:) has been removed
571
+
Func Set.filter(_:obsoletedInSwift4:) has been removed
572
+
Func SignedNumeric.abs(_:) has been removed
573
+
Func Strideable.+(_:_:) has been removed (deprecated)
574
+
Func Strideable.+=(_:_:) has been removed (deprecated)
575
+
Func Strideable.-(_:_:) has been removed (deprecated)
576
+
Func Strideable.-=(_:_:) has been removed (deprecated)
577
+
Func String.UTF16View.distance(from:to:) has been removed
578
+
Func String.UTF16View.index(_:offsetBy:) has been removed
579
+
Func String.UTF16View.index(after:) has been removed
580
+
Func String.UTF8View.distance(from:to:) has been removed
581
+
Func String.UTF8View.index(_:offsetBy:) has been removed
582
+
Func String.UTF8View.index(after:) has been removed
583
+
Func String.UnicodeScalarView.distance(from:to:) has been removed
584
+
Func String.UnicodeScalarView.index(_:offsetBy:) has been removed
585
+
Func String.UnicodeScalarView.index(after:) has been removed
586
+
Func String.UnicodeScalarView.popFirst() has been removed (deprecated)
587
+
Func String.popFirst() has been removed (deprecated)
588
+
Func TextOutputStreamable.writeTo(_:) has been removed
589
+
Func UnsignedInteger.toUIntMax() has been removed
590
+
Protocol _BitwiseOperations has been removed
591
+
Subscript String.UTF16View.subscript(_:) has been removed
592
+
Subscript String.UTF8View.subscript(_:) has been removed
593
+
Subscript String.UnicodeScalarView.subscript(_:) has been removed
594
+
Subscript String.subscript(_:) has been removed
595
+
Var BinaryFloatingPoint.NaN has been removed
596
+
Var BinaryFloatingPoint.isSignaling has been removed
597
+
Var BinaryFloatingPoint.quietNaN has been removed
598
+
Var Dictionary.keys has been removed
599
+
Var Dictionary.values has been removed
600
+
Var FixedWidthInteger.allZeros has been removed (deprecated)
601
+
Var String.Index._offset has been removed (deprecated)
602
+
Var String.Index._utf16Index has been removed (deprecated)
Copy file name to clipboardExpand all lines: test/stdlib/StringCompatibilityDiagnostics.swift
-5Lines changed: 0 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,6 @@
2
2
3
3
func testPopFirst(){
4
4
varstr="abc"
5
-
_ = str.popFirst() // expected-error{{'popFirst()' is unavailable: Please use 'first', 'dropFirst()', or 'Substring.popFirst()'}}
6
-
_ = str.characters.popFirst() // expected-error{{'characters' is unavailable: Please use String directly}}
7
-
// expected-error@-1{{'popFirst()' is unavailable: Please use 'first', 'dropFirst()', or 'Substring.popFirst()'}}
8
-
_ = str.unicodeScalars.popFirst() // expected-error{{'popFirst()' is unavailable: Please use 'first', 'dropFirst()', or 'Substring.UnicodeScalarView.popFirst()'}}
9
-
10
5
varcharView:String.CharacterView // expected-error{{'CharacterView' is unavailable: Please use String directly}}
11
6
_ = str.characters // expected-error{{'characters' is unavailable: Please use String directly}}
Copy file name to clipboardExpand all lines: test/stdlib/StringCompatibilityDiagnostics4.swift
-7Lines changed: 0 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -2,12 +2,6 @@
2
2
3
3
func testPopFirst(){
4
4
varstr="abc"
5
-
_ = str.popFirst() // expected-error{{'popFirst()' is unavailable: Please use 'first', 'dropFirst()', or 'Substring.popFirst()'}}
6
-
_ = str.characters.popFirst() // expected-warning{{'characters' is deprecated: Please use String directly}}
7
-
// expected-error@-1{{'popFirst()' is unavailable: Please use 'first', 'dropFirst()', or 'Substring.popFirst()'}}
8
-
_ = str.popFirst() // expected-error{{'popFirst()' is unavailable: Please use 'first', 'dropFirst()', or 'Substring.popFirst()'}}
9
-
_ = str.unicodeScalars.popFirst() // expected-error{{'popFirst()' is unavailable: Please use 'first', 'dropFirst()', or 'Substring.UnicodeScalarView.popFirst()'}}
10
-
11
5
varcharView:String.CharacterView // expected-warning{{'CharacterView' is deprecated: Please use String directly}}
12
6
charView = str.characters // expected-warning{{'characters' is deprecated: Please use String directly}}
13
7
dump(charView)
@@ -22,7 +16,6 @@ func testPopFirst() {
22
16
dump(charSubView)
23
17
24
18
var _ =String(str.utf8)??"" // expected-warning{{left side of nil coalescing operator '??' has non-optional type 'String', so the right side is never used}}
25
-
var _:String=String(str.utf8)! // expected-error{{'init(_:)' is unavailable: Please use non-failable String.init(_:UTF8View) instead}}
_ = ${T}(1) + Stride(0) // expected-error {{'+' is unavailable: Please use explicit type conversions or Strideable methods for mixed-type arithmetics.}}
91
-
_ = Stride(1) + ${T}(0) // expected-error {{'+' is unavailable: Please use explicit type conversions or Strideable methods for mixed-type arithmetics.}}
92
-
_ = ${T}(1) - Stride(0) // expected-error {{'-' is unavailable: Please use explicit type conversions or Strideable methods for mixed-type arithmetics.}}
0 commit comments