Reflected API changes after rebase
This commit is contained in:
@@ -154,7 +154,7 @@ private class JetDeclarationRemotenessWeigher(private val file: JetFile) : Looku
|
|||||||
val importPath = ImportPath(qualifiedName)
|
val importPath = ImportPath(qualifiedName)
|
||||||
val fqName = importPath.fqnPart()
|
val fqName = importPath.fqnPart()
|
||||||
return when {
|
return when {
|
||||||
JavaToKotlinClassMap.getInstance().mapPlatformClass(fqName).isNotEmpty() -> Weight.notToBeUsedInKotlin
|
JavaToKotlinClassMap.INSTANCE.mapPlatformClass(fqName).isNotEmpty() -> Weight.notToBeUsedInKotlin
|
||||||
ImportInsertHelper.getInstance().isImportedWithDefault(importPath, file) -> Weight.kotlinDefaultImport
|
ImportInsertHelper.getInstance().isImportedWithDefault(importPath, file) -> Weight.kotlinDefaultImport
|
||||||
importCache.isImportedWithPreciseImport(fqName) -> Weight.preciseImport
|
importCache.isImportedWithPreciseImport(fqName) -> Weight.preciseImport
|
||||||
importCache.isImportedWithAllUnderImport(fqName) -> Weight.allUnderImport
|
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
|
// skip declarations of type Nothing or of generic parameter type which has no real bounds
|
||||||
private fun shouldSkipDeclarationsOfType(type: FuzzyType): Boolean {
|
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
|
if (type.freeParameters.isEmpty()) return false
|
||||||
val typeParameter = type.type.getConstructor().getDeclarationDescriptor() as? TypeParameterDescriptor ?: return false
|
val typeParameter = type.type.getConstructor().getDeclarationDescriptor() as? TypeParameterDescriptor ?: return false
|
||||||
if (!type.freeParameters.contains(typeParameter)) 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
|
//TODO: check for class object constraint when there will be supported
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ public class ImportInsertHelperImpl extends ImportInsertHelper {
|
|||||||
? TopDownAnalyzerFacadeForJS.DEFAULT_IMPORTS
|
? TopDownAnalyzerFacadeForJS.DEFAULT_IMPORTS
|
||||||
: TopDownAnalyzerFacadeForJVM.DEFAULT_IMPORTS;
|
: TopDownAnalyzerFacadeForJVM.DEFAULT_IMPORTS;
|
||||||
if (importPath.fqnPart().asString().startsWith("java.lang.")
|
if (importPath.fqnPart().asString().startsWith("java.lang.")
|
||||||
&& !JavaToKotlinClassMap.getInstance().mapPlatformClass(importPath.fqnPart()).isEmpty()) {
|
&& !JavaToKotlinClassMap.INSTANCE.mapPlatformClass(importPath.fqnPart()).isEmpty()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return NamePackage.isImported(importPath, defaultImports);
|
return NamePackage.isImported(importPath, defaultImports);
|
||||||
|
|||||||
Reference in New Issue
Block a user