Skip to content

Instantly share code, notes, and snippets.

@malatx
Created November 11, 2015 01:23
Show Gist options
  • Save malatx/93553765ae6aad5d7f9c to your computer and use it in GitHub Desktop.
Save malatx/93553765ae6aad5d7f9c to your computer and use it in GitHub Desktop.
protocol A {}
protocol B {
typealias AType
func setAn(a: AType)
}
struct SomeB: B {
typealias AType = A
func setAn(a: AType)
{
}
}
struct SomeC {
func doWith(a: A){
let b = SomeB()
b.setAn(a) // no error, here
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment