Skip to content

Instantly share code, notes, and snippets.

@earltedly
Created March 21, 2016 19:54
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save earltedly/67ab52c3c65ba22f6fa5 to your computer and use it in GitHub Desktop.
Save earltedly/67ab52c3c65ba22f6fa5 to your computer and use it in GitHub Desktop.
//: Playground - noun: a place where people can play
import UIKit
protocol Foo {
}
protocol Bar {
}
class Test {
typealias Delegate=protocol<Foo,Bar>
func configure(withDelegate delegate: Delegate) {
}
}
class MyDelegate: Foo, Bar {
}
let test = Test()
test.configure(withDelegate: MyDelegate())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment