Files
kotlin-fork/idea/testData/debugger/tinyApp/outs/delegatedPropertyInClass.out
T
Alexander Udalov a4732b442d Don't create KClass and KPackage instances in <clinit>
This proved to be a fragile technique, which probably doesn't even improve
performance in most cases but has lots of unexpected problems: unconditional
initialization of reflection classes, increasing the size of the bytecode, bugs
with <clinit> in annotations on JVM 6, inability to support conversion of a
class from Kotlin to Java without recompiling clients which use it
reflectively, etc.
2015-10-11 17:10:35 +03:00

44 lines
2.2 KiB
Plaintext
Vendored

LineBreakpoint created at delegatedPropertyInClass.kt:8
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! delegatedPropertyInClass.DelegatedPropertyInClassPackage
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
delegatedPropertyInClass.kt:8
package delegatedPropertyInClass
import kotlin.properties.Delegates
fun main(args: Array<String>) {
val a = A()
//Breakpoint!
args.size()
}
class A {
val prop by MyDelegate()
val propEx by MyDelegateThrowsException()
}
class MyDelegate {
fun getValue(t: Any?, p: PropertyMetadata): Int = 1
}
class MyDelegateThrowsException {
fun getValue(t: Any?, p: PropertyMetadata): Int = throw IllegalStateException()
}
// PRINT_FRAME
frame = main():8, DelegatedPropertyInClassKt {delegatedPropertyInClass}
local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = delegatedPropertyInClass.kt, 5)
local = a: delegatedPropertyInClass.A = {delegatedPropertyInClass.A@uniqueID} (sp = delegatedPropertyInClass.kt, 6)
field = prop$delegate: delegatedPropertyInClass.MyDelegate = {delegatedPropertyInClass.MyDelegate@uniqueID} (sp = delegatedPropertyInClass.kt, 12)
- Class has no fields
field = prop: int = 1 (sp = delegatedPropertyInClass.kt, 12)
field = propEx$delegate: delegatedPropertyInClass.MyDelegateThrowsException = {delegatedPropertyInClass.MyDelegateThrowsException@uniqueID} (sp = delegatedPropertyInClass.kt, 13)
- Class has no fields
field = propEx: int = {java.lang.IllegalStateException@uniqueID}java.lang.IllegalStateException (sp = delegatedPropertyInClass.kt, 13)
field = detailMessage: java.lang.String = null (sp = Throwable.!EXT!)
field = cause: java.lang.Throwable = {java.lang.IllegalStateException@uniqueID}java.lang.IllegalStateException (sp = Throwable.!EXT!)
field = stackTrace: java.lang.StackTraceElement[] = null (sp = Throwable.!EXT!)
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0