Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protocol FooProtocol {
- func blah()
- }
- struct Foo : FooProtocol {
- func blah() {}
- }
- struct FooTaker {
- init(inout aFoo: FooProtocol) {
- println("I got a foo! \(aFoo)")
- }
- }
- let x: FooProtocol? = Foo()
- if var foo = x {
- FooTaker(aFoo: &foo)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement