Fix local delegated property smartcast usage

This commit is contained in:
Ilya Gorbunov
2018-06-22 20:49:52 +03:00
parent 80f022c3d5
commit bed26dc700
3 changed files with 11 additions and 12 deletions
@@ -182,10 +182,10 @@ fun KtElement.processInternalReferencesToUpdateOnPackageNameChange(
val isImported = isImported(descriptor)
if (isImported && this is KtFile) return null
if (declaration == null) return null
val declarationNotNull = declaration ?: return null
if (isExtension || containerFqName != null || isImported) return {
createMoveUsageInfoIfPossible(it.mainReference, declaration, false, true)
createMoveUsageInfoIfPossible(it.mainReference, declarationNotNull, false, true)
}
return null