Created
May 10, 2019 15:53
-
-
Save arkivanov/90db53c6944ce725d168baea7c7d2899 to your computer and use it in GitHub Desktop.
Java invariance in Kotlin 2
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
fun bar(source: Observable<out CharSequence>) { | |
source.scan { a, b -> "$a,$b" } // Compilation error | |
} | |
fun foo(source: Observable<String>) { | |
bar(source) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment