Articles, podcasts and news about Swift development, by John Sundell.

Using a name already taken by the standard library

Published on 07 Mar 2017

Want to use a name already taken by the standard library for a nested type? No problem - just use Swift. to disambiguate:

extension Command {
    enum Error: Swift.Error {
        case missing
        case invalid(String)
    }
}