Advertisement
Guest User

Untitled

a guest
Oct 20th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Kotlin 0.16 KB | None | 0 0
  1. class A<T: Any>(defaultValue: T) {
  2.     var value = defaultValue
  3.     fun <T2: Any>matchesType(b: A<T2>) {
  4.         value::class.isSuperclass(b.value::class)
  5.     }
  6. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement