Skip to content

Instantly share code, notes, and snippets.

@jhurray
Created October 22, 2015 03:24
Show Gist options
  • Select an option

  • Save jhurray/134f37bdd65f93aee9f6 to your computer and use it in GitHub Desktop.

Select an option

Save jhurray/134f37bdd65f93aee9f6 to your computer and use it in GitHub Desktop.
Help me!
import UIKit
struct typeable<T> {
let value : String = "hello world"
}
protocol inside {
func __myFunction() -> typeable<inside>
}
protocol outside : inside {
typealias MyType : inside
func myFunction() -> typeable<MyType>
}
extension outside {
final func __myFunction() -> typeable<inside> {
return self.myFunction()
}
}
struct thing : outside {
typealias MyType = thing
func myFunction() -> typeable<thing> {
return typeable<thing>()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment