KT-31291: KAPT - make sure ASM version is not inlined
Switch to Java reflection when getting the ASM version used to analyze classes. Using Kotlin reflection resulted in the constant being inlined. Fixes KT-31291 Fixes KT-33493
This commit is contained in:
committed by
Yan Zhulanow
parent
60fa632d02
commit
58efa34a33
+2
-1
@@ -15,7 +15,8 @@ const val metadataDescriptor: String = "Lkotlin/Metadata;"
|
||||
*/
|
||||
internal val lazyAsmApiVersion = lazy {
|
||||
try {
|
||||
Opcodes::API_VERSION.get()
|
||||
val field = Opcodes::class.java.getField("API_VERSION")
|
||||
field.get(null) as Int
|
||||
} catch(e: Throwable) {
|
||||
Opcodes.API_VERSION
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user