Last active
August 29, 2015 14:03
-
-
Save jspahrsummers/cb9ae22c0fd0da0d539b to your computer and use it in GitHub Desktop.
Covariance + generics = 😢
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
class Stream<T> { | |
// But I want `Stream<U>` to instead be typed as whatever subclass this is invoked upon | |
func map<U>(f: T -> U) -> Stream<U> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment