Skip to content

Instantly share code, notes, and snippets.

@erokhins
Created September 4, 2014 13:26
Show Gist options
  • Save erokhins/68a2a0b58f3e9d799443 to your computer and use it in GitHub Desktop.
Save erokhins/68a2a0b58f3e9d799443 to your computer and use it in GitHub Desktop.
trait Inv<T> {
var t: T
}
fun <T> some(t: Inv<T>): Inv<Inv<T>> {
return object : Inv<Inv<T>> {
override var t: Inv<T>
get() = t
set(value: Inv<T>) {
t.t = value.t
}
}
}
trait A
trait B: A
trait C: B
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment