Skip to content

Instantly share code, notes, and snippets.

@cbruegg
Last active June 24, 2016 09:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cbruegg/fb42d9cf90582b31520830e7f8a86096 to your computer and use it in GitHub Desktop.
Save cbruegg/fb42d9cf90582b31520830e7f8a86096 to your computer and use it in GitHub Desktop.
class A()
class B<T>()
fun <T> A.f(b: B<T>) {
val eq = this == b // Error: Operator '==' cannot be applied to 'A' and 'B<T>'
}
class A2<T>()
class B2<T>()
fun <T> A2<T>.f(b: B2<T>) {
val eq = this == b // No error here
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment