Files
kotlin/compiler/testData/codegen/box/inlineClasses/contextsAndAccessors/captureInlineClassInstanceInObject.kt
Dmitry Petrov edc8cf3ed0 Use proper type for context 'this'
Bug in 'generateThisOrOuterFromContext', it worked while instance of a
class was always an object.

 #KT-27078
2018-09-25 11:15:29 +03:00

12 lines
222 B
Kotlin
Vendored

// !LANGUAGE: +InlineClasses
// IGNORE_BACKEND: JVM_IR
inline class R(private val r: Int) {
fun test() = object {
override fun toString() = ok()
}.toString()
fun ok() = "OK"
}
fun box() = R(0).test()