Skip to content

Commit 56931dc

Browse files
Merge pull request #4150 from aschwaighofer/changelog_entries
Changelog entries
2 parents ad8bd43 + ef86b96 commit 56931dc

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

CHANGELOG.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,73 @@ Note: This is in reverse chronological order, so newer entries are added to the
33
Swift 3.0
44
---------
55

6+
* [SE-125)(https://github.com/apple/swift-evolution/blob/master/proposals/0125-remove-nonobjectivecbase.md)
7+
8+
The functions `isUniquelyReferenced()` and `isUniquelyReferencedNonObjC()`
9+
have been removed. The function `isKnownUniquelyReferenced()` should be called
10+
instead. The class `NonObjectiveCBase` which classes using
11+
`isUniquelyReferenced()` needed to inherit from was removed.
12+
13+
The method `ManagedBufferPointer.holdsUniqueReference` was renamed to
14+
`ManagedBufferPointer.isUniqueReference`.
15+
16+
```swift
17+
// old
18+
class SwiftKlazz : NonObjectiveCBase {}
19+
expectTrue(isUniquelyReferenced(SwiftKlazz()))
20+
21+
var managedPtr : ManagedBufferPointer = ...
22+
if !managedPtr.holdsUniqueReference() {
23+
print("not unique")
24+
}
25+
26+
27+
// new
28+
class SwiftKlazz {}
29+
expectTrue(isKnownUniquelyReferenced(SwiftKlazz()))
30+
31+
var managedPtr : ManagedBufferPointer = ...
32+
if !managedPtr.isUniqueReference() {
33+
print("not unique")
34+
}
35+
36+
```
37+
38+
* [SE-124](https://github.com/apple/swift-evolution/blob/master/proposals/0124-bitpattern-label-for-int-initializer-objectidentfier.md)
39+
40+
The initializers on `Int` and `UInt` accepting an `ObjectIdentifier` now need
41+
to be spelled with an explicit `bitPattern` label.
42+
43+
```swift
44+
let x: ObjectIdentifier = ...
45+
46+
// old
47+
let u = UInt(x)
48+
let i = Int(x)
49+
50+
// new
51+
let u = UInt(bitPattern: x)
52+
let i = Int(bitPattern: x)
53+
```
54+
55+
* [SE-120](https://github.com/apple/swift-evolution/blob/master/proposals/0120-revise-partition-method.md)
56+
57+
The collection methods `partition()` and `partition(isOrderedBefore:)` have
58+
been removed from Swift. They were replaced by the method `partition(by:)`
59+
which takes an unary predicate.
60+
61+
Calls to the `partition()` method can be replaced by the following code.
62+
63+
```swift
64+
// old
65+
let p = c.partition()
66+
67+
// new
68+
let p = c.first.flatMap({ first in
69+
c.partition(by: { $0 >= first })
70+
}) ?? c.startIndex
71+
```
72+
673
* [SE-103](https://github.com/apple/swift-evolution/blob/master/proposals/0103-make-noescape-default.md)
774

875
Closure parameters are non-escaping by default, rather than explicitly being

0 commit comments

Comments
 (0)