Created
July 12, 2013 14:34
-
-
Save erokhins/5984931 to your computer and use it in GitHub Desktop.
bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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