2016-11-08 23:44 GMT+03:00 Adrian Zubarev <[email protected]>:

At first glance this doesn’t make any sense to me:
>
> public protocol ExpressibleByNilLiteral {
>   associatedtype NilLiteralType = Nil
>   init(nilLiteral: NilLiteralType)
> }
>
> What’s the need for associatedtype there?
>
> Shouldn’t it be just like this:
>
> public protocol ExpressibleByNilLiteral {
>
>   init(nilLiteral: Nil)
> }
>
> Probably. I just looked at ExpressibleByBooleanLiteral, and it contained
BooleanLiteralType, which should always be Bool by convention.
If someone knows, why this associatedtype is needed in
ExpressibleByBooleanLiteral, please explain.
​
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to