Skip to content

Commit 34b82bf

Browse files
Resolve conflicts with master
2 parents a512ddf + 55b8555 commit 34b82bf

File tree

1,562 files changed

+58372
-21459
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,562 files changed

+58372
-21459
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- Please complete this template before creating pull request. -->
1+
<!-- Please complete this template before creating the pull request. -->
22
#### What's in this pull request?
33
<!-- Description about pull request. -->
44

@@ -21,17 +21,27 @@ The swift-ci is triggered by writing a comment on this PR addressed to the GitHu
2121
Platform | Comment
2222
------------ | -------------
2323
All supported platforms | @swift-ci Please smoke test
24+
All supported platforms | @swift-ci Please smoke test and merge
2425
OS X platform | @swift-ci Please smoke test OS X platform
2526
Linux platform | @swift-ci Please smoke test Linux platform
2627

27-
**Validation Testing**
28+
**Validation Testing**
2829

2930
Platform | Comment
3031
------------ | -------------
3132
All supported platforms | @swift-ci Please test
33+
All supported platforms | @swift-ci Please test and merge
3234
OS X platform | @swift-ci Please test OS X platform
35+
OS X platform | @swift-ci Please benchmark
3336
Linux platform | @swift-ci Please test Linux platform
3437

38+
39+
**Lint Testing**
40+
41+
Language | Comment
42+
------------ | -------------
43+
Python | @swift-ci Please Python lint
44+
3545
Note: Only members of the Apple organization can trigger swift-ci.
3646
</details>
3747
<!-- Thank you for your contribution to Swift! -->

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*~
1414
# Merge files created by git.
1515
*.orig
16-
# Byte compiled python modules.
16+
# Byte compiled Python modules.
1717
*.pyc
1818
# vim swap files
1919
.*.sw[a-z]

.pep8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[flake8]
2-
filename = *.py,80+-check,Benchmark_Driver,Benchmark_DTrace.in,Benchmark_GuardMalloc.in,Benchmark_RuntimeLeaksRunner.in,build-script,check-incremental,gyb,line-directive,mock-distcc,ns-html2rst,recursive-lipo,rth,split-generated-tests,submit-benchmark-results,update-checkout,viewcfg,backtrace-check
2+
filename = *.py,80+-check,Benchmark_Driver,Benchmark_DTrace.in,Benchmark_GuardMalloc.in,Benchmark_RuntimeLeaksRunner.in,build-script,check-incremental,gyb,line-directive,mock-distcc,ns-html2rst,recursive-lipo,rth,run-test,submit-benchmark-results,update-checkout,viewcfg,backtrace-check

CHANGELOG.md

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

6+
* [SE-0060](https://github.com/apple/swift-evolution/blob/master/proposals/0060-defaulted-parameter-order.md):
7+
Function parameters with default arguments must now be specified in
8+
declaration order. A call site must always supply the arguments it provides
9+
to a function in their declared order:
10+
11+
```swift
12+
func requiredArguments(a: Int, b: Int, c: Int) {}
13+
func defaultArguments(a: Int = 0, b: Int = 0, c: Int = 0) {}
14+
15+
requiredArguments(a: 0, b: 1, c: 2)
16+
requiredArguments(b: 0, a: 1, c: 2) // error
17+
defaultArguments(a: 0, b: 1, c: 2)
18+
defaultArguments(b: 0, a: 1, c: 2) // error
19+
```
20+
21+
Arbitrary labeled parameters with default arguments may still be elided, as
22+
long as the specified arguments follow declaration order:
23+
24+
```swift
25+
defaultArguments(a: 0) // ok
26+
defaultArguments(b: 1) // ok
27+
defaultArguments(c: 2) // ok
28+
defaultArguments(a: 1, c: 2) // ok
29+
defaultArguments(b: 1, c: 2) // ok
30+
defaultArguments(c: 1, b: 2) // error
31+
```
32+
33+
* Traps from force-unwrapping nil `Optional`s now show the source location
34+
of the force unwrap operator.
35+
36+
* [SE-0093](https://github.com/apple/swift-evolution/blob/master/proposals/0093-slice-base.md): Slice types now have a `base` property that allows public readonly access to their base collections.
37+
38+
* Nested generic functions may now capture bindings from the environment, for example:
39+
40+
```swift
41+
func outer<T>(t: T) -> T {
42+
func inner<U>(u: U) -> (T, U) {
43+
return (t, u)
44+
}
45+
return inner(u: (t, t)).0
46+
}
47+
```
48+
49+
* Initializers are now inherited even if the base class or derived class is generic:
50+
51+
```swift
52+
class Base<T> {
53+
let t: T
54+
55+
init(t: T) {
56+
self.t = t
57+
}
58+
}
59+
60+
class Derived<T> : Base<T> {
61+
// init(t: T) is now synthesized to call super.init(t: t)
62+
}
63+
```
64+
65+
* [SE-0081](https://github.com/apple/swift-evolution/blob/master/proposals/0081-move-where-expression.md)
66+
"Move 'where' clause to end of declaration" is implemented, allowing you to
67+
write 'where' clauses after the signature for a declaration, but before its
68+
body. For example, before:
69+
70+
```swift
71+
func anyCommonElements<T : SequenceType, U : SequenceType
72+
where T.Generator.Element: Equatable, T.Generator.Element == U.Generator.Element>
73+
(lhs: T, _ rhs: U) -> Bool
74+
{
75+
...
76+
}
77+
```
78+
79+
after:
80+
81+
```swift
82+
func anyCommonElements<T : SequenceType, U : SequenceType>(lhs: T, _ rhs: U) -> Bool
83+
where T.Generator.Element: Equatable, T.Generator.Element == U.Generator.Element
84+
{
85+
...
86+
}
87+
```
88+
89+
The old form is still accepted for compatibility, but will eventually be rejected.
90+
691
* [SE-0071](https://github.com/apple/swift-evolution/blob/master/proposals/0071-member-keywords.md):
792
"Allow (most) keywords in member references" is implemented. This allows the
893
use of members after a dot without backticks, e.g. "foo.default".
@@ -184,7 +269,7 @@ Swift 3.0
184269
* Generic signatures can now contain superclass requirements with generic
185270
parameter types, for example:
186271

187-
```
272+
```swift
188273
func f<Food : Chunks<Meat>, Meat : Molerat>(f: Food, m: Meat) {}
189274
```
190275

@@ -225,6 +310,9 @@ Swift 3.0
225310
person.valueForKeyPath(#keyPath(Person.bestFriend.lastName))
226311
```
227312

313+
**If you are adding a new entry, add it to the top of the file, not here!**
314+
315+
228316
Swift 2.2
229317
---------
230318

0 commit comments

Comments
 (0)