Created
June 23, 2016 18:15
-
-
Save dduan/613e29fcbf5ae4ed7c17b1fcfca63a43 to your computer and use it in GitHub Desktop.
Will this compile?
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
protocol X { | |
var value: Int { get } | |
init(value: Int) | |
} | |
func foo<T, U: X>(a: T) -> U { | |
return U(value: a.value) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment