Skip to content
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

protocol 中 typealias 的使用 #77

Closed
bruce-bai22 opened this issue Sep 8, 2017 · 1 comment
Closed

protocol 中 typealias 的使用 #77

bruce-bai22 opened this issue Sep 8, 2017 · 1 comment

Comments

@bruce-bai22
Copy link

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

protocol ExpressibleByBooleanLiteral {
    typealias BooleanLiteralType

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

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

@onevcat
Copy link
Member

onevcat commented Sep 8, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants