diff --git a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/AsmVersionForJpsBuildTest.kt b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/AsmVersionForJpsBuildTest.kt new file mode 100644 index 00000000000..b6564c4068e --- /dev/null +++ b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/AsmVersionForJpsBuildTest.kt @@ -0,0 +1,16 @@ +package org.jetbrains.kotlin.jps.build + +import junit.framework.TestCase +import org.jetbrains.kotlin.codegen.AbstractClassBuilder +import org.jetbrains.org.objectweb.asm.Opcodes +import org.jetbrains.org.objectweb.asm.RecordComponentVisitor + +class AsmVersionForJpsBuildTest : TestCase() { + // Kotlin compiler contains some version of ASM that is taken from a particular platform dependency + fun testAsmVersionForBundledKotlinCompiler() { + val field = RecordComponentVisitor::class.java.getDeclaredField("api").also { it.trySetAccessible() } + val asmVersionForBundledCompiler = field.getInt(AbstractClassBuilder.EMPTY_RECORD_VISITOR) + + assertEquals(Opcodes.ASM8, asmVersionForBundledCompiler) + } +} \ No newline at end of file