Created
July 9, 2015 19:14
-
-
Save casademora/443dad5d16d095f8747a to your computer and use it in GitHub Desktop.
Implement a method incorrectly by using generic rather than protocol parameter crashes clang compiler
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 Thing { | |
var name: String { get } | |
} | |
protocol UsingThing { | |
func doSomething(with: Thing) | |
} | |
struct Test: UsingThing { | |
func doSomething<T: Thing>(thing: T) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment