Skip to content

Instantly share code, notes, and snippets.

@erokhins
Created July 12, 2013 14:34
Show Gist options
  • Select an option

  • Save erokhins/5984931 to your computer and use it in GitHub Desktop.

Select an option

Save erokhins/5984931 to your computer and use it in GitHub Desktop.
bug
trait I<T> {
public fun invoke(f: T.() -> Unit) {}
}
open class A: I<A> {
val c1 = 1
}
class B: I<B> {
val c2 = 2
}
open class C
val C.attr = A()
open class D: C()
val D.attr = B()
fun main(args: Array<String>) {
val b = D()
val d = b.attr
d {
c2
}
b.attr {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment