Write KotlinInterfaceDefaultImpls annotation to DefaultImpls classes

Instead of KotlinSyntheticClass with kind = TRAIT_IMPL
This commit is contained in:
Alexander Udalov
2015-10-01 15:25:41 +03:00
parent e4090d3f30
commit 5bb47c8365
7 changed files with 54 additions and 17 deletions
@@ -41,10 +41,8 @@ public fun isKotlinJvmCompiledFile(file: VirtualFile): Boolean {
return false
}
val header = KotlinBinaryClassCache.getKotlinBinaryClass(file)?.getClassHeader()
return header != null &&
header.syntheticClassKind != KotlinSyntheticClass.Kind.TRAIT_IMPL &&
header.syntheticClassKind != KotlinSyntheticClass.Kind.LOCAL_TRAIT_IMPL
val header = KotlinBinaryClassCache.getKotlinBinaryClass(file)?.classHeader
return header != null && !header.isInterfaceDefaultImpls
}
public fun isKotlinJsMetaFile(file: VirtualFile): Boolean = file.getFileType() == KotlinJavaScriptMetaFileType