ugly and incomplete solution for using correct bytecode instruction when accessing properties inherited from traits (KT-2391)
This commit is contained in:
@@ -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()!!
|
||||
}
|
||||
Reference in New Issue
Block a user