Add "map.get() with not-null assertion operator" inspection #KT-25171 Fixed

This commit is contained in:
Toshiaki Kameyama
2018-10-25 23:46:30 +09:00
committed by Mikhail Glukhikh
parent c5c0cbccde
commit d3908aeb2e
13 changed files with 156 additions and 1 deletions
@@ -425,7 +425,6 @@ fun returnExpressionVisitor(block: (KtReturnExpression) -> Unit) =
}
}
fun delegatedSuperTypeEntry(block: (KtDelegatedSuperTypeEntry) -> Unit) =
object : KtVisitorVoid() {
override fun visitDelegatedSuperTypeEntry(delegatedSuperTypeEntry: KtDelegatedSuperTypeEntry) {
@@ -433,3 +432,11 @@ fun delegatedSuperTypeEntry(block: (KtDelegatedSuperTypeEntry) -> Unit) =
block(delegatedSuperTypeEntry)
}
}
fun postfixExpressionVisitor(block: (KtPostfixExpression) -> Unit) =
object : KtVisitorVoid() {
override fun visitPostfixExpression(expression: KtPostfixExpression) {
super.visitPostfixExpression(expression)
block(expression)
}
}