Cleanup: apply "Use synthetic property access syntax"
This commit is contained in:
@@ -472,7 +472,7 @@ class KotlinIndicesHelper(
|
||||
|
||||
private fun KtNamedDeclaration.resolveToDescriptorsWithHack(
|
||||
psiFilter: (KtDeclaration) -> Boolean): Collection<DeclarationDescriptor> {
|
||||
if (getContainingKtFile().isCompiled) { //TODO: it's temporary while resolveToDescriptor does not work for compiled declarations
|
||||
if (containingKtFile.isCompiled) { //TODO: it's temporary while resolveToDescriptor does not work for compiled declarations
|
||||
return resolutionFacade.resolveImportReference(moduleDescriptor, fqName!!).filterIsInstance<DeclarationDescriptor>()
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -102,7 +102,7 @@ fun ImplicitReceiver.asExpression(resolutionScope: LexicalScope, psiFactory: KtP
|
||||
|
||||
fun KtImportDirective.targetDescriptors(resolutionFacade: ResolutionFacade = this.getResolutionFacade()): Collection<DeclarationDescriptor> {
|
||||
// For codeFragments imports are created in dummy file
|
||||
if (this.getContainingKtFile().doNotAnalyze != null) return emptyList()
|
||||
if (this.containingKtFile.doNotAnalyze != null) return emptyList()
|
||||
val nameExpression = importedReference?.getQualifiedElementSelector() as? KtSimpleNameExpression ?: return emptyList()
|
||||
return nameExpression.mainReference.resolveToDescriptors(resolutionFacade.analyze(nameExpression))
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ fun PsiElement.deleteSingle() {
|
||||
}
|
||||
|
||||
fun KtClass.getOrCreateCompanionObject() : KtObjectDeclaration {
|
||||
getCompanionObjects().firstOrNull()?.let { return it }
|
||||
companionObjects.firstOrNull()?.let { return it }
|
||||
return addDeclaration(KtPsiFactory(this).createCompanionObject())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user