kt-1760 delegation to java iface:

- removed codegen's unnecessary lookup for a declaration
- skipped class' only supertype (if any) methods when delegating
This commit is contained in:
Kirill Berezin
2012-08-26 17:51:36 +04:00
committed by Andrey Breslav
parent 78cb5381f7
commit b84f068c33
6 changed files with 79 additions and 11 deletions
@@ -0,0 +1,13 @@
class TestJava(r : Runnable) : Runnable by r {}
class TestRunnable() : Runnable {
public override fun run() = System.out.println("foobar")
}
fun box() : String {
var del = TestJava(TestRunnable())
del.run()
if (del !is Runnable)
return "Fail #1"
return "OK"
}