Skip to content

Commit

Permalink
Fixed diff with master
Browse files Browse the repository at this point in the history
  • Loading branch information
Alefas committed Mar 20, 2020
1 parent 6473e35 commit fc81533
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import org.jetbrains.kotlin.psi.psiUtil.hasBody
import org.jetbrains.kotlin.renderer.DescriptorRenderer
import org.jetbrains.kotlin.types.KotlinType
import org.jetbrains.kotlin.types.isError
import kotlin.contracts.contract

class KotlinSuggestedRefactoringAvailability(refactoringSupport: SuggestedRefactoringSupport) :
SuggestedRefactoringAvailability(refactoringSupport)
Expand All @@ -41,7 +40,7 @@ class KotlinSuggestedRefactoringAvailability(refactoringSupport: SuggestedRefact

override fun refineSignaturesWithResolve(state: SuggestedRefactoringState): SuggestedRefactoringState {
val newDeclaration = state.declaration as? KtCallableDeclaration ?: return state
val oldDeclaration = state.restoredDeclarationCopy() as KtCallableDeclaration
val oldDeclaration = state.restoredDeclarationCopy() as? KtCallableDeclaration ?: return state
oldDeclaration.containingKtFile.forcedModuleInfo = newDeclaration.getModuleInfo()

val descriptorWithOldSignature = oldDeclaration.resolveToDescriptorIfAny() as CallableDescriptor
Expand Down

0 comments on commit fc81533

Please sign in to comment.