[swift-evolution] Specify type of a delegate which conforms to a protocol

Alex Hoppen alex at ateamer.de
Wed Feb 10 04:53:13 CST 2016


> On 10 Feb 2016, at 10:30, Inder Kumar Rathore . via swift-evolution <swift-evolution at swift.org> wrote:
> 
> I was thinking something like this
> 
> 
> var myVar: UIViewController<MyProtocol>

This syntax is already used for the case that UIViewController is a generic class and its generic argument is set to MyProtocol.

> 
> kind of thing what you guys say
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution



More information about the swift-evolution mailing list