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.
This commit is contained in:
@@ -26,7 +26,7 @@ class MyDelegate {
|
||||
local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = delegatedPropertyInClassWoRenderer.kt, 5)
|
||||
local = a: delegatedPropertyInClassWoRenderer.A = {delegatedPropertyInClassWoRenderer.A@uniqueID} (sp = delegatedPropertyInClassWoRenderer.kt, 6)
|
||||
field = prop: int = {delegatedPropertyInClassWoRenderer.MyDelegate@uniqueID} (sp = delegatedPropertyInClassWoRenderer.kt, 12)
|
||||
- No fields to display
|
||||
- Class has no fields
|
||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
|
||||
Process finished with exit code 0
|
||||
|
||||
Reference in New Issue
Block a user