Evaluate overloaded toString() in watches for Kotlin classes with delegate properties (KT-14068)
(cherry picked from commit 7774d2c) #KT-14068 Fixed
This commit is contained in:
committed by
Nikolay Krasko
parent
440bdea736
commit
944b9b5b6c
+21
@@ -0,0 +1,21 @@
|
||||
package delegatedPropertyInClassWithToString
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val a = A()
|
||||
//Breakpoint!
|
||||
args.size
|
||||
}
|
||||
|
||||
class A {
|
||||
val prop by MyDelegate()
|
||||
|
||||
override fun toString(): String = "KotlinTest"
|
||||
}
|
||||
|
||||
class MyDelegate {
|
||||
operator fun getValue(t: Any?, p: KProperty<*>): Int = 1
|
||||
}
|
||||
|
||||
// PRINT_FRAME
|
||||
Reference in New Issue
Block a user