Last active
October 18, 2017 10:20
-
-
Save soxjke/5e384cdfe9b4f3b788994f15107b65cc to your computer and use it in GitHub Desktop.
Swift 4 crash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public protocol A { | |
associatedtype V | |
associatedtype E | |
var a: V { get } | |
} | |
public protocol B { | |
associatedtype V | |
var b: V { get } | |
} | |
class C<V, E> { | |
var v: V? = nil | |
var e: E? = nil | |
} | |
extension C: A { | |
typealias V = C.V | |
typealias E = C.E | |
var a: C.V { | |
return v! | |
} | |
} | |
extension C: B { | |
typealias V = C.E | |
var b: C.E { | |
return e! | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment