Skip to content

Commit

Permalink
Rewrite 'Notes on Swift 4'-section in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Anviking authored Oct 2, 2017
1 parent 95a02fd commit 66eaa34
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,11 @@ let array = try NSArray.decode(json => "list").map {
| Swift 2.2 | `v0.4.3`|

## Note on Swift 4.0 usage
Due to collisions with the standard library you will need to make use of the following import syntax:
Due to collisions with the standard library you will have to import ambiguous symbols specifically, in addition to `Decodable` as a whole.

This means you likely want the following
```swift
import Decodable
import protocol Decodable.Decodable
import enum Decodable.DecodingError
import struct Decodable.KeyPath
```

and you can import other symbols, e.g `KeyPath`, `DecodingError`, in a simlilar fashion (using `import struct` and `import enum`)

0 comments on commit 66eaa34

Please sign in to comment.