swifter-tips / Public-Issues

Public issues for Swifter-tips book

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

protocol 中 typealias 的使用

bruce-bai22 opened this issue · comments

第三版中的95页介绍字面量时,有定义:

protocol ExpressibleByBooleanLiteral {
    typealias BooleanLiteralType

    /// Create an instance initialized to `value`.
    init(booleanLiteral value: BooleanLiteralType)
}

目前protocol里是不是要用 associatedtype来代替 typealias了?

感谢指出。将在随后更正。