Skip to content

[Changelog] Tweak code snippets #35344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ Swift 5.1
Duplicate tuple element labels are no longer allowed, because it leads
to incorrect behavior. For example:

```
```swift
let dupLabels: (foo: Int, foo: Int) = (foo: 1, foo: 2)

enum Foo { case bar(x: Int, x: Int) }
Expand All @@ -538,7 +538,7 @@ Swift 5.1
Note: You can still use duplicate argument labels when declaring functions and
subscripts, as long as the internal parameter names are different. For example:

```
```swift
func foo(bar x: Int, bar y: Int) {}
subscript(a x: Int, a y: Int) -> Int {}
```
Expand All @@ -548,7 +548,7 @@ Swift 5.1
Functions can now hide their concrete return type by declaring what protocols
it conforms to instead of specifying the exact return type:

```
```swift
func makeMeACollection() -> some Collection {
return [1, 2, 3]
}
Expand Down Expand Up @@ -6755,7 +6755,7 @@ Swift 1.0

* A `map` method with the semantics of Haskell's `fmap` was added to
`Array<T>`. Map applies a function `f: T->U` to the values stored in
the array and returns an Array<U>. So,
the array and returns an `Array<U>`. So,

```swift
(swift) func names(x: Int[]) -> String[] {
Expand Down