Skip to content

Instantly share code, notes, and snippets.

@arkivanov
Created May 10, 2019 15:52
Show Gist options
  • Save arkivanov/5de8ff354b98e4432844543a02ec9a00 to your computer and use it in GitHub Desktop.
Save arkivanov/5de8ff354b98e4432844543a02ec9a00 to your computer and use it in GitHub Desktop.
Java invariance in Kotlin 1
fun bar(source: Observable<CharSequence>) {
}
fun foo(source: Observable<String>) {
bar(source) // Compilation error
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment