From f8f07dc82422f6908426f5ba85fdbce78c576ca7 Mon Sep 17 00:00:00 2001 From: Valentin Kipyatkov Date: Thu, 20 Nov 2014 17:02:49 +0300 Subject: [PATCH] Minor --- .../jet/lang/resolve/lazy/PartialBodyResolveFilter.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/idea/ide-common/src/org/jetbrains/jet/lang/resolve/lazy/PartialBodyResolveFilter.kt b/idea/ide-common/src/org/jetbrains/jet/lang/resolve/lazy/PartialBodyResolveFilter.kt index 22fd17e9284..5822e4d5dc5 100644 --- a/idea/ide-common/src/org/jetbrains/jet/lang/resolve/lazy/PartialBodyResolveFilter.kt +++ b/idea/ide-common/src/org/jetbrains/jet/lang/resolve/lazy/PartialBodyResolveFilter.kt @@ -45,7 +45,7 @@ class PartialBodyResolveFilter( ;{ assert(body.isAncestor(elementToResolve, strict = false)) - body.accept(object : JetVisitorVoid(){ + body.accept(object : JetVisitorVoid() { override fun visitNamedFunction(function: JetNamedFunction) { super.visitNamedFunction(function) @@ -288,7 +288,7 @@ class PartialBodyResolveFilter( insideLoop = false } else { - // do not make sense to search exits inside for as not necessary enter it at all + // do not make sense to search exits inside while-loop as not necessary enter it at all condition?.accept(this) } } @@ -343,14 +343,14 @@ class PartialBodyResolveFilter( /** * Recursively visits code but does not enter constructs that may not affect smart casts/control flow */ - private inner abstract class ControlFlowVisitor : JetVisitorVoid() { + private abstract class ControlFlowVisitor : JetVisitorVoid() { override fun visitJetElement(element: JetElement) { if (element.noControlFlowInside()) return element.acceptChildren(this) } - } - private fun JetElement.noControlFlowInside() = this is JetFunction || this is JetClass || this is JetClassBody + private fun JetElement.noControlFlowInside() = this is JetFunction || this is JetClass || this is JetClassBody + } private fun addStatementsToResolveForPlaces(places: Collection) { for (place in places) {