Reflected API changes after rebase

This commit is contained in:
Valentin Kipyatkov
2014-12-03 19:12:43 +03:00
parent 3b51b5a51b
commit b8a0a1a313
3 changed files with 4 additions and 4 deletions
@@ -154,7 +154,7 @@ private class JetDeclarationRemotenessWeigher(private val file: JetFile) : Looku
val importPath = ImportPath(qualifiedName)
val fqName = importPath.fqnPart()
return when {
JavaToKotlinClassMap.getInstance().mapPlatformClass(fqName).isNotEmpty() -> Weight.notToBeUsedInKotlin
JavaToKotlinClassMap.INSTANCE.mapPlatformClass(fqName).isNotEmpty() -> Weight.notToBeUsedInKotlin
ImportInsertHelper.getInstance().isImportedWithDefault(importPath, file) -> Weight.kotlinDefaultImport
importCache.isImportedWithPreciseImport(fqName) -> Weight.preciseImport
importCache.isImportedWithAllUnderImport(fqName) -> Weight.allUnderImport
@@ -205,11 +205,11 @@ class SmartCompletion(val expression: JetSimpleNameExpression,
// skip declarations of type Nothing or of generic parameter type which has no real bounds
private fun shouldSkipDeclarationsOfType(type: FuzzyType): Boolean {
if (KotlinBuiltIns.getInstance().isNothing(type.type)) return true
if (KotlinBuiltIns.isNothing(type.type)) return true
if (type.freeParameters.isEmpty()) return false
val typeParameter = type.type.getConstructor().getDeclarationDescriptor() as? TypeParameterDescriptor ?: return false
if (!type.freeParameters.contains(typeParameter)) return false
return KotlinBuiltIns.getInstance().isAnyOrNullableAny(typeParameter.getUpperBoundsAsType())
return KotlinBuiltIns.isAnyOrNullableAny(typeParameter.getUpperBoundsAsType())
//TODO: check for class object constraint when there will be supported
}
@@ -117,7 +117,7 @@ public class ImportInsertHelperImpl extends ImportInsertHelper {
? TopDownAnalyzerFacadeForJS.DEFAULT_IMPORTS
: TopDownAnalyzerFacadeForJVM.DEFAULT_IMPORTS;
if (importPath.fqnPart().asString().startsWith("java.lang.")
&& !JavaToKotlinClassMap.getInstance().mapPlatformClass(importPath.fqnPart()).isEmpty()) {
&& !JavaToKotlinClassMap.INSTANCE.mapPlatformClass(importPath.fqnPart()).isEmpty()) {
return false;
}
return NamePackage.isImported(importPath, defaultImports);