Remove reference to KotlinBuiltIns from CompanionObjectMapping

Make it a class
This commit is contained in:
Pavel V. Talanov
2015-09-16 15:56:42 +03:00
parent d2a4235dd8
commit 424d71e964
4 changed files with 13 additions and 8 deletions
@@ -69,7 +69,8 @@ public class JavaToKotlinClassMap implements PlatformToKotlinClassMap {
add(ClassId.topLevel(jvmType.getWrapperFqName()), builtIns.getPrimitiveClassDescriptor(jvmType.getPrimitiveType()));
}
for (ClassDescriptor descriptor : CompanionObjectMapping.allClassesWithIntrinsicCompanions()) {
CompanionObjectMapping companionObjectMapping = new CompanionObjectMapping(builtIns);
for (ClassDescriptor descriptor : companionObjectMapping.allClassesWithIntrinsicCompanions()) {
ClassDescriptor companion = descriptor.getCompanionObjectDescriptor();
assert companion != null : "No companion object found for " + descriptor;
add(ClassId.topLevel(new FqName("kotlin.jvm.internal." + descriptor.getName().asString() + "CompanionObject")), companion);