ugly and incomplete solution for using correct bytecode instruction when accessing properties inherited from traits (KT-2391)

This commit is contained in:
Dmitry Jemerov
2012-07-10 21:20:53 +02:00
parent e4f45fc514
commit 1fe9c291f1
3 changed files with 42 additions and 3 deletions
@@ -0,0 +1,19 @@
public trait LoggerAware {
public val logger: StringBuilder
}
public abstract class HttpServer(): LoggerAware {
public fun start() {
logger.append("OK")
}
}
public class MyHttpServer(): HttpServer() {
public override val logger = StringBuilder()
}
fun box(): String {
val server = MyHttpServer()
server.start()
return server.logger.toString()!!
}