Use ASM 6 API to read class files in IDE

Otherwise ASM throws exceptions trying to read module-info.class

 #KT-13072 Fixed
This commit is contained in:
Alexander Udalov
2017-06-30 22:08:46 +03:00
parent 51fb02b2d5
commit 7ab018da7b
2 changed files with 5 additions and 2 deletions
@@ -52,12 +52,12 @@ object KotlinJvmMetadataVersionIndex : KotlinMetadataVersionIndexBase<KotlinJvmM
tryBlock(inputData) {
val classReader = ClassReader(inputData.content)
classReader.accept(object : ClassVisitor(Opcodes.ASM5) {
classReader.accept(object : ClassVisitor(Opcodes.ASM6) {
override fun visitAnnotation(desc: String, visible: Boolean): AnnotationVisitor? {
if (desc != METADATA_DESC) return null
annotationPresent = true
return object : AnnotationVisitor(Opcodes.ASM5) {
return object : AnnotationVisitor(Opcodes.ASM6) {
override fun visit(name: String, value: Any) {
when (name) {
METADATA_VERSION_FIELD_NAME -> if (value is IntArray) {