Skip to content

Commit 4819f24

Browse files
committed
optimized inspection
1 parent e0fbed6 commit 4819f24

File tree

1 file changed

+2
-2
lines changed
  • src/main/java/com/tang/intellij/lua/codeInsight/inspection

1 file changed

+2
-2
lines changed

src/main/java/com/tang/intellij/lua/codeInsight/inspection/Inspections.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import com.tang.intellij.lua.psi.*
2525
class UnreachableStatement : LocalInspectionTool() {
2626
override fun buildVisitor(holder: ProblemsHolder, isOnTheFly: Boolean, session: LocalInspectionToolSession): PsiElementVisitor =
2727
object : LuaVisitor() {
28-
override fun visitPsiElement(o: LuaPsiElement) {
28+
override fun visitStatement(o: LuaStatement) {
2929
var sibling = o.prevSibling
3030
var found = false
3131
while (sibling != null && !found) {
@@ -45,7 +45,7 @@ class UnreachableStatement : LocalInspectionTool() {
4545
sibling = sibling.prevSibling
4646
}
4747

48-
if (!found) super.visitPsiElement(o)
48+
if (!found) super.visitStatement(o)
4949
}
5050
}
5151
}

0 commit comments

Comments
 (0)