Fix bug when chain in the upper level is not found

This commit is contained in:
Vitaliy.Bibaev
2017-10-24 16:20:28 +03:00
committed by Yan Zhulanow
parent 56a783b858
commit 4cb8cc3653
@@ -40,7 +40,7 @@ abstract class KotlinChainBuilderBase(private val transformer: ChainTransformer<
private fun toUpperLevel(element: PsiElement): PsiElement? {
var current = element.parent
while (current != null && !(current is KtLambdaExpression || current is KtAnonymousInitializer)) {
while (current != null && !(current is KtLambdaExpression || current is KtAnonymousInitializer || current is KtObjectDeclaration)) {
current = current.parent
}