Don't report warning about changing execution order for varargs if it's inside an annotation
^KT-43110 Fixed
This commit is contained in:
+3
@@ -12,12 +12,15 @@ import org.jetbrains.kotlin.psi.KtValueArgument
|
||||
import org.jetbrains.kotlin.resolve.calls.callUtil.getParameterForArgument
|
||||
import org.jetbrains.kotlin.resolve.calls.components.isVararg
|
||||
import org.jetbrains.kotlin.resolve.calls.model.*
|
||||
import org.jetbrains.kotlin.resolve.descriptorUtil.isAnnotationConstructor
|
||||
|
||||
object VarargWrongExecutionOrderChecker : CallChecker {
|
||||
override fun check(resolvedCall: ResolvedCall<*>, reportOn: PsiElement, context: CallCheckerContext) {
|
||||
val isCorrectExecutionOrderForVarargArgumentsAlreadyUsed =
|
||||
context.languageVersionSettings.getFeatureSupport(LanguageFeature.UseCorrectExecutionOrderForVarargArguments) == LanguageFeature.State.ENABLED
|
||||
|
||||
if (resolvedCall.candidateDescriptor.isAnnotationConstructor()) return
|
||||
|
||||
if (isCorrectExecutionOrderForVarargArgumentsAlreadyUsed) return
|
||||
|
||||
val valueArguments = resolvedCall.call.valueArguments
|
||||
|
||||
Reference in New Issue
Block a user