Cleanup code in FirAnnotationArgumentChecker
This commit is contained in:
committed by
TeamCityServer
parent
18f617a582
commit
776920f77d
+5
-6
@@ -18,13 +18,12 @@ 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) }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user