Cleanup code in FirAnnotationArgumentChecker
This commit is contained in:
committed by
TeamCityServer
parent
18f617a582
commit
776920f77d
+2
-3
@@ -18,15 +18,14 @@ import org.jetbrains.kotlin.psi.KtExpression
|
|||||||
|
|
||||||
object FirAnnotationArgumentChecker : FirAnnotationCallChecker() {
|
object FirAnnotationArgumentChecker : FirAnnotationCallChecker() {
|
||||||
override fun check(expression: FirAnnotationCall, context: CheckerContext, reporter: DiagnosticReporter) {
|
override fun check(expression: FirAnnotationCall, context: CheckerContext, reporter: DiagnosticReporter) {
|
||||||
expression.argumentMapping?.let {
|
val argumentMapping = expression.argumentMapping ?: return
|
||||||
for ((arg, _) in it) {
|
for ((arg, _) in argumentMapping) {
|
||||||
val argExpression = (arg as? FirNamedArgumentExpression)?.expression ?: arg
|
val argExpression = (arg as? FirNamedArgumentExpression)?.expression ?: arg
|
||||||
|
|
||||||
checkAnnotationArgumentWithSubElements(argExpression, context.session, reporter, context)
|
checkAnnotationArgumentWithSubElements(argExpression, context.session, reporter, context)
|
||||||
?.let { reporter.reportOn(argExpression.source, it, context) }
|
?.let { reporter.reportOn(argExpression.source, it, context) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private fun checkAnnotationArgumentWithSubElements(
|
private fun checkAnnotationArgumentWithSubElements(
|
||||||
expression: FirExpression,
|
expression: FirExpression,
|
||||||
|
|||||||
Reference in New Issue
Block a user