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
+60-4Lines changed: 60 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -357,8 +357,6 @@ Struct _DropWhileSequence has generic signature change from <τ_0_0 where τ_0_0
357
357
Struct _DropWhileSequence has removed conformance to IteratorProtocol
358
358
Struct _DropWhileSequence has type witness type for Sequence.Iterator changing from _DropWhileSequence<τ_0_0> to DropWhileSequence<τ_0_0>.Iterator
359
359
Var Collection.lazy has been removed
360
-
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>
361
-
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>
362
360
Var LazySequence._base has removed its setter
363
361
Var _DropWhileSequence._iterator has declared type change from τ_0_0 to τ_0_0.Iterator
364
362
Func Collection._preprocessingPass(_:) has been removed
@@ -528,8 +526,6 @@ Func LazyCollectionProtocol.prefix(while:) has been removed
528
526
Func LazyCollectionProtocol.reversed() has been removed
529
527
Var LazyCollectionProtocol.lazy has declared type change from LazyCollection<τ_0_0.Elements> to LazySequence<τ_0_0.Elements>
530
528
531
-
Func Sequence.reduce(into:_:) has parameter 0 changing from Default to Owned
532
-
533
529
Class _AbstractStringStorage has been changed to a Protocol
534
530
Class _AbstractStringStorage has generic signature change from to <τ_0_0 : _NSCopying>
535
531
Class _AbstractStringStorage has removed conformance to _NSCopying
@@ -542,5 +538,65 @@ Constructor _AbstractStringStorage.init() has been removed
542
538
Func _AbstractStringStorage.copy(with:) has been removed
543
539
Func _AbstractStringStorage.getOrComputeBreadcrumbs() has been removed
544
540
541
+
Func Sequence.reduce(into:_:) has parameter 0 changing from Default to Owned
542
+
543
+
Constructor String.Index.init(_codeUnitOffset:) has been removed (deprecated)
544
+
Constructor String.Index.init(_position:) has been removed (deprecated)
545
+
Constructor String.init(_:) has been removed (deprecated)
546
+
Constructor String.init(_:obsoletedInSwift4:) has been removed
547
+
Constructor _ExpressibleByColorLiteral.init(colorLiteralRed:green:blue:alpha:) has been removed (deprecated)
548
+
Func BinaryInteger.toIntMax() has been removed
549
+
Func Dictionary.filter(_:obsoletedInSwift4:) has been removed
550
+
Func FixedWidthInteger.unsafeAdding(_:) has been removed
551
+
Func FixedWidthInteger.unsafeDivided(by:) has been removed
552
+
Func FixedWidthInteger.unsafeMultiplied(by:) has been removed
553
+
Func FixedWidthInteger.unsafeSubtracting(_:) has been removed
554
+
Func FloatingPoint._fromBitPattern(_:) has been removed
555
+
Func FloatingPoint._toBitPattern() has been removed
556
+
Func FloatingPoint.abs(_:) has been removed (deprecated)
557
+
Func FloatingPoint.add(_:) has been removed
558
+
Func FloatingPoint.adding(_:) has been removed
559
+
Func FloatingPoint.divide(by:) has been removed
560
+
Func FloatingPoint.divided(by:) has been removed
561
+
Func FloatingPoint.multiplied(by:) has been removed
562
+
Func FloatingPoint.multiply(by:) has been removed
563
+
Func FloatingPoint.negated() has been removed
564
+
Func FloatingPoint.subtract(_:) has been removed
565
+
Func FloatingPoint.subtracting(_:) has been removed
566
+
Func Optional....(_:_:) has been removed
567
+
Func Optional...<(_:_:) has been removed
568
+
Func Set.filter(_:obsoletedInSwift4:) has been removed
569
+
Func SignedNumeric.abs(_:) has been removed
570
+
Func Strideable.+(_:_:) has been removed (deprecated)
571
+
Func Strideable.+=(_:_:) has been removed (deprecated)
572
+
Func Strideable.-(_:_:) has been removed (deprecated)
573
+
Func Strideable.-=(_:_:) has been removed (deprecated)
574
+
Func String.UTF16View.distance(from:to:) has been removed
575
+
Func String.UTF16View.index(_:offsetBy:) has been removed
576
+
Func String.UTF16View.index(after:) has been removed
577
+
Func String.UTF8View.distance(from:to:) has been removed
578
+
Func String.UTF8View.index(_:offsetBy:) has been removed
579
+
Func String.UTF8View.index(after:) has been removed
580
+
Func String.UnicodeScalarView.distance(from:to:) has been removed
581
+
Func String.UnicodeScalarView.index(_:offsetBy:) has been removed
582
+
Func String.UnicodeScalarView.index(after:) has been removed
583
+
Func String.UnicodeScalarView.popFirst() has been removed (deprecated)
584
+
Func String.popFirst() has been removed (deprecated)
585
+
Func TextOutputStreamable.writeTo(_:) has been removed
586
+
Func UnsignedInteger.toUIntMax() has been removed
587
+
Protocol _BitwiseOperations has been removed
588
+
Subscript String.UTF16View.subscript(_:) has been removed
589
+
Subscript String.UTF8View.subscript(_:) has been removed
590
+
Subscript String.UnicodeScalarView.subscript(_:) has been removed
591
+
Subscript String.subscript(_:) has been removed
592
+
Var BinaryFloatingPoint.NaN has been removed
593
+
Var BinaryFloatingPoint.isSignaling has been removed
594
+
Var BinaryFloatingPoint.quietNaN has been removed
595
+
Var Dictionary.keys has been removed
596
+
Var Dictionary.values has been removed
597
+
Var FixedWidthInteger.allZeros has been removed (deprecated)
598
+
Var String.Index._offset has been removed (deprecated)
599
+
Var String.Index._utf16Index has been removed (deprecated)
600
+
545
601
Func MutableCollection.withContiguousMutableStorageIfAvailable(_:) has been added as a protocol requirement
546
602
Func Sequence.withContiguousStorageIfAvailable(_:) has been added as a protocol requirement
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