Load class kind in KotlinSyntheticClass annotation

Fix some of the usages of KotlinSyntheticClass header where really package
parts were meant (they were committed by mistake).

DescriptorResolverUtils.isCompiledKotlinPackageClass no longer checks for class
being a compiled package part, because PSI classes are not built for package
parts (according to EmptyPackageFragmentClsStubBuilderFactory)
This commit is contained in:
Alexander Udalov
2014-03-03 20:59:56 +04:00
parent ea40389e34
commit eb5aba560e
10 changed files with 93 additions and 78 deletions
@@ -46,7 +46,7 @@ public class EmptyPackageFragmentClsStubBuilderFactory extends ClsStubBuilderFac
if (file.getName().contains(PackageClassUtils.PACKAGE_CLASS_NAME_SUFFIX + "-") &&
StdFileTypes.CLASS.getDefaultExtension().equals(file.getExtension())) {
KotlinClassHeader header = new VirtualFileKotlinClass(LockBasedStorageManager.NO_LOCKS, file).getClassHeader();
return header != null && header.getKind() == KotlinClassHeader.Kind.SYNTHETIC_CLASS;
return header != null && header.getKind() == KotlinClassHeader.Kind.PACKAGE_PART;
}
return false;
}