From 6444ccc96287ca49fba9786fd3444446be6046bc Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Tue, 27 Dec 2016 14:23:47 +0300 Subject: [PATCH] Do not skip .kotlin_metadata files with only type aliases in them --- .../idea/decompiler/builtIns/KotlinBuiltInDecompiler.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/builtIns/KotlinBuiltInDecompiler.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/builtIns/KotlinBuiltInDecompiler.kt index 7854834c6b2..c723a91af9d 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/builtIns/KotlinBuiltInDecompiler.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/builtIns/KotlinBuiltInDecompiler.kt @@ -130,10 +130,10 @@ sealed class BuiltInDefinitionFile { val proto = BuiltInsProtoBuf.BuiltIns.parseFrom(stream, BuiltInSerializerProtocol.extensionRegistry) val result = BuiltInDefinitionFile.Compatible(proto, file.parent, file.extension == MetadataPackageFragment.METADATA_FILE_EXTENSION) + val packageProto = result.proto.`package` if (result.classesToDecompile.isEmpty() && - result.proto.`package`.functionCount == 0 && - result.proto.`package`.propertyCount == 0) { - // No callables or top-level classes to decompile: should skip this file + packageProto.typeAliasCount == 0 && packageProto.functionCount == 0 && packageProto.propertyCount == 0) { + // No declarations to decompile: should skip this file return null }