diff --git a/compiler/frontend/src/org/jetbrains/kotlin/psi/JetPsiFactory.kt b/compiler/frontend/src/org/jetbrains/kotlin/psi/JetPsiFactory.kt index ca90cb2b0e4..e027c1dbdfa 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/psi/JetPsiFactory.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/psi/JetPsiFactory.kt @@ -226,9 +226,9 @@ public class JetPsiFactory(private val project: Project) { return createProperty(text + " val x").getModifierList()!! } - public fun createAnnotation(text: String): JetAnnotation { + public fun createAnnotationEntry(text: String): JetAnnotationEntry { val modifierList = createProperty(text + " val x").getModifierList() - return modifierList!!.getAnnotations().first() + return modifierList!!.getAnnotationEntries().first() } public fun createEmptyBody(): JetBlockExpression { diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/quickfix/KotlinSuppressIntentionAction.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/quickfix/KotlinSuppressIntentionAction.kt index d5908cf84ef..2b999530eb6 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/quickfix/KotlinSuppressIntentionAction.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/quickfix/KotlinSuppressIntentionAction.kt @@ -66,7 +66,7 @@ public class KotlinSuppressIntentionAction( val entry = findSuppressAnnotation(suppressAt) if (entry == null) { // no [suppress] annotation - val newAnnotation = psiFactory.createAnnotation(suppressAnnotationText(id)) + val newAnnotation = psiFactory.createAnnotationEntry(suppressAnnotationText(id)) val addedAnnotation = modifierList.addBefore(newAnnotation, modifierList.getFirstChild()) val whiteSpace = psiFactory.createWhiteSpace(kind) modifierList.addAfter(whiteSpace, addedAnnotation) @@ -81,7 +81,7 @@ public class KotlinSuppressIntentionAction( private fun suppressAtAnnotatedExpression(suppressAt: CaretBox, id: String) { val entry = findSuppressAnnotation(suppressAt.expression) if (entry != null) { - // already annotated with [suppress] + // already annotated with @suppress addArgumentToSuppressAnnotation(entry, id) } else { @@ -129,7 +129,7 @@ public class KotlinSuppressIntentionAction( } } - private fun suppressAnnotationText(id: String) = "[suppress($id)]" + private fun suppressAnnotationText(id: String) = "@suppress($id)" private fun findSuppressAnnotation(annotated: JetAnnotated): JetAnnotationEntry? { val context = annotated.analyze() diff --git a/idea/testData/quickfix/suppress/annotationPosition/afterParamWithModifier.kt b/idea/testData/quickfix/suppress/annotationPosition/afterParamWithModifier.kt index c3a54564ecc..96c8c7b964a 100644 --- a/idea/testData/quickfix/suppress/annotationPosition/afterParamWithModifier.kt +++ b/idea/testData/quickfix/suppress/annotationPosition/afterParamWithModifier.kt @@ -1,3 +1,3 @@ // "Suppress 'REDUNDANT_NULLABLE' for parameter p" "true" -fun foo([suppress("REDUNDANT_NULLABLE")] vararg p: String??) = null \ No newline at end of file +fun foo(@suppress("REDUNDANT_NULLABLE") vararg p: String??) = null \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionModifierOnThePreviousLine.kt b/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionModifierOnThePreviousLine.kt index 2c5e84fd98c..6d032987a71 100644 --- a/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionModifierOnThePreviousLine.kt +++ b/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionModifierOnThePreviousLine.kt @@ -1,5 +1,5 @@ // "Suppress 'REDUNDANT_NULLABLE' for fun foo" "true" -[suppress("REDUNDANT_NULLABLE")] +@suppress("REDUNDANT_NULLABLE") public fun foo(): String?? = null \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionModifierOnTheSameLine.kt b/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionModifierOnTheSameLine.kt index b957caf8145..1aee3b32d81 100644 --- a/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionModifierOnTheSameLine.kt +++ b/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionModifierOnTheSameLine.kt @@ -1,4 +1,4 @@ // "Suppress 'REDUNDANT_NULLABLE' for fun foo" "true" -[suppress("REDUNDANT_NULLABLE")] +@suppress("REDUNDANT_NULLABLE") public fun foo(): String?? = null \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionNoModifiers.kt b/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionNoModifiers.kt index 5b773f9a5e3..27fddc94690 100644 --- a/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionNoModifiers.kt +++ b/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionNoModifiers.kt @@ -1,4 +1,4 @@ // "Suppress 'REDUNDANT_NULLABLE' for fun foo" "true" -[suppress("REDUNDANT_NULLABLE")] +@suppress("REDUNDANT_NULLABLE") fun foo(): String?? = null \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionSuppressAnotherPreviousLine.kt b/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionSuppressAnotherPreviousLine.kt index 391b0f862e4..a6761573f14 100644 --- a/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionSuppressAnotherPreviousLine.kt +++ b/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionSuppressAnotherPreviousLine.kt @@ -1,4 +1,4 @@ // "Suppress 'REDUNDANT_NULLABLE' for fun foo" "true" -[suppress("FOO", "REDUNDANT_NULLABLE")] +@suppress("FOO", "REDUNDANT_NULLABLE") fun foo(): String?? = null \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionSuppressEmptyArgsPreviousLine.kt b/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionSuppressEmptyArgsPreviousLine.kt index 5b773f9a5e3..27fddc94690 100644 --- a/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionSuppressEmptyArgsPreviousLine.kt +++ b/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionSuppressEmptyArgsPreviousLine.kt @@ -1,4 +1,4 @@ // "Suppress 'REDUNDANT_NULLABLE' for fun foo" "true" -[suppress("REDUNDANT_NULLABLE")] +@suppress("REDUNDANT_NULLABLE") fun foo(): String?? = null \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionSuppressNoArgsPreviousLine.kt b/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionSuppressNoArgsPreviousLine.kt index 5b773f9a5e3..27fddc94690 100644 --- a/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionSuppressNoArgsPreviousLine.kt +++ b/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionSuppressNoArgsPreviousLine.kt @@ -1,4 +1,4 @@ // "Suppress 'REDUNDANT_NULLABLE' for fun foo" "true" -[suppress("REDUNDANT_NULLABLE")] +@suppress("REDUNDANT_NULLABLE") fun foo(): String?? = null \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionSuppressNoArgsTheSameLine.kt b/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionSuppressNoArgsTheSameLine.kt index 83346e6b90f..5e9b96867e6 100644 --- a/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionSuppressNoArgsTheSameLine.kt +++ b/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionSuppressNoArgsTheSameLine.kt @@ -1,3 +1,3 @@ // "Suppress 'REDUNDANT_NULLABLE' for fun foo" "true" -[suppress("REDUNDANT_NULLABLE")] fun foo(): String?? = null \ No newline at end of file +@suppress("REDUNDANT_NULLABLE") fun foo(): String?? = null \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionUnrelatedAnnotation.kt b/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionUnrelatedAnnotation.kt index f27eb5a8375..aeb71c0e3fb 100644 --- a/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionUnrelatedAnnotation.kt +++ b/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionUnrelatedAnnotation.kt @@ -1,6 +1,6 @@ // "Suppress 'REDUNDANT_NULLABLE' for fun foo" "true" -[suppress("REDUNDANT_NULLABLE")] +@suppress("REDUNDANT_NULLABLE") [ann] fun foo(): String?? = null annotation class ann \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionUnrelatedAnnotationBare.kt b/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionUnrelatedAnnotationBare.kt index 08022a3d989..a178ea6e19b 100644 --- a/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionUnrelatedAnnotationBare.kt +++ b/idea/testData/quickfix/suppress/annotationPosition/afterTopLevelFunctionUnrelatedAnnotationBare.kt @@ -1,6 +1,6 @@ // "Suppress 'REDUNDANT_NULLABLE' for fun foo" "true" -[suppress("REDUNDANT_NULLABLE")] +@suppress("REDUNDANT_NULLABLE") ann fun foo(): String?? = null annotation class ann \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/annotationPosition/beforeTopLevelFunctionSuppressAnotherPreviousLine.kt b/idea/testData/quickfix/suppress/annotationPosition/beforeTopLevelFunctionSuppressAnotherPreviousLine.kt index c9788a92595..5e5e1cf3809 100644 --- a/idea/testData/quickfix/suppress/annotationPosition/beforeTopLevelFunctionSuppressAnotherPreviousLine.kt +++ b/idea/testData/quickfix/suppress/annotationPosition/beforeTopLevelFunctionSuppressAnotherPreviousLine.kt @@ -1,4 +1,4 @@ // "Suppress 'REDUNDANT_NULLABLE' for fun foo" "true" -[suppress("FOO")] +@suppress("FOO") fun foo(): String?? = null \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/annotationPosition/beforeTopLevelFunctionSuppressEmptyArgsPreviousLine.kt b/idea/testData/quickfix/suppress/annotationPosition/beforeTopLevelFunctionSuppressEmptyArgsPreviousLine.kt index f321895982c..958b427dd2b 100644 --- a/idea/testData/quickfix/suppress/annotationPosition/beforeTopLevelFunctionSuppressEmptyArgsPreviousLine.kt +++ b/idea/testData/quickfix/suppress/annotationPosition/beforeTopLevelFunctionSuppressEmptyArgsPreviousLine.kt @@ -1,4 +1,4 @@ // "Suppress 'REDUNDANT_NULLABLE' for fun foo" "true" -[suppress()] +@suppress() fun foo(): String?? = null \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/annotationPosition/beforeTopLevelFunctionSuppressNoArgsPreviousLine.kt b/idea/testData/quickfix/suppress/annotationPosition/beforeTopLevelFunctionSuppressNoArgsPreviousLine.kt index 06db94442f3..8ccfb8c47f9 100644 --- a/idea/testData/quickfix/suppress/annotationPosition/beforeTopLevelFunctionSuppressNoArgsPreviousLine.kt +++ b/idea/testData/quickfix/suppress/annotationPosition/beforeTopLevelFunctionSuppressNoArgsPreviousLine.kt @@ -1,4 +1,4 @@ // "Suppress 'REDUNDANT_NULLABLE' for fun foo" "true" -[suppress] +@suppress fun foo(): String?? = null \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/annotationPosition/beforeTopLevelFunctionSuppressNoArgsTheSameLine.kt b/idea/testData/quickfix/suppress/annotationPosition/beforeTopLevelFunctionSuppressNoArgsTheSameLine.kt index d32ec69a5ca..08b5f80a467 100644 --- a/idea/testData/quickfix/suppress/annotationPosition/beforeTopLevelFunctionSuppressNoArgsTheSameLine.kt +++ b/idea/testData/quickfix/suppress/annotationPosition/beforeTopLevelFunctionSuppressNoArgsTheSameLine.kt @@ -1,3 +1,3 @@ // "Suppress 'REDUNDANT_NULLABLE' for fun foo" "true" -[suppress] fun foo(): String?? = null \ No newline at end of file +@suppress fun foo(): String?? = null \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/availability/afterLocalFunSuppressForLocal.kt b/idea/testData/quickfix/suppress/availability/afterLocalFunSuppressForLocal.kt index 09bb6a2fcfb..fae97af5dd8 100644 --- a/idea/testData/quickfix/suppress/availability/afterLocalFunSuppressForLocal.kt +++ b/idea/testData/quickfix/suppress/availability/afterLocalFunSuppressForLocal.kt @@ -1,6 +1,6 @@ // "Suppress 'REDUNDANT_NULLABLE' for fun local" "true" fun foo() { - [suppress("REDUNDANT_NULLABLE")] + @suppress("REDUNDANT_NULLABLE") fun local(): String?? = null } diff --git a/idea/testData/quickfix/suppress/availability/afterLocalFunSuppressForOuter.kt b/idea/testData/quickfix/suppress/availability/afterLocalFunSuppressForOuter.kt index 80246e35932..799bad2bf38 100644 --- a/idea/testData/quickfix/suppress/availability/afterLocalFunSuppressForOuter.kt +++ b/idea/testData/quickfix/suppress/availability/afterLocalFunSuppressForOuter.kt @@ -1,6 +1,6 @@ // "Suppress 'REDUNDANT_NULLABLE' for fun foo" "true" -[suppress("REDUNDANT_NULLABLE")] +@suppress("REDUNDANT_NULLABLE") fun foo() { fun local(): String?? = null } diff --git a/idea/testData/quickfix/suppress/availability/afterLocalValSuppressForFun.kt b/idea/testData/quickfix/suppress/availability/afterLocalValSuppressForFun.kt index 7be052419b3..67df06c34c0 100644 --- a/idea/testData/quickfix/suppress/availability/afterLocalValSuppressForFun.kt +++ b/idea/testData/quickfix/suppress/availability/afterLocalValSuppressForFun.kt @@ -1,6 +1,6 @@ // "Suppress 'REDUNDANT_NULLABLE' for fun foo" "true" -[suppress("REDUNDANT_NULLABLE")] +@suppress("REDUNDANT_NULLABLE") fun foo() { val a: String?? = null } diff --git a/idea/testData/quickfix/suppress/availability/afterLocalValSuppressForVal.kt b/idea/testData/quickfix/suppress/availability/afterLocalValSuppressForVal.kt index bfa71eb333f..05da93f76fa 100644 --- a/idea/testData/quickfix/suppress/availability/afterLocalValSuppressForVal.kt +++ b/idea/testData/quickfix/suppress/availability/afterLocalValSuppressForVal.kt @@ -1,6 +1,6 @@ // "Suppress 'REDUNDANT_NULLABLE' for val a" "true" fun foo() { - [suppress("REDUNDANT_NULLABLE")] + @suppress("REDUNDANT_NULLABLE") val a: String?? = null } diff --git a/idea/testData/quickfix/suppress/availability/afterMemberOfNestedSuppressForMember.kt b/idea/testData/quickfix/suppress/availability/afterMemberOfNestedSuppressForMember.kt index 3d7de15ed42..5a5a1a8f8db 100644 --- a/idea/testData/quickfix/suppress/availability/afterMemberOfNestedSuppressForMember.kt +++ b/idea/testData/quickfix/suppress/availability/afterMemberOfNestedSuppressForMember.kt @@ -2,7 +2,7 @@ class C { class D { - [suppress("REDUNDANT_NULLABLE")] + @suppress("REDUNDANT_NULLABLE") fun foo(): String?? = null } } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/availability/afterMemberOfNestedSuppressForNested.kt b/idea/testData/quickfix/suppress/availability/afterMemberOfNestedSuppressForNested.kt index c06df09b4d4..4cb8fdc0c16 100644 --- a/idea/testData/quickfix/suppress/availability/afterMemberOfNestedSuppressForNested.kt +++ b/idea/testData/quickfix/suppress/availability/afterMemberOfNestedSuppressForNested.kt @@ -1,7 +1,7 @@ // "Suppress 'REDUNDANT_NULLABLE' for class D" "true" class C { - [suppress("REDUNDANT_NULLABLE")] + @suppress("REDUNDANT_NULLABLE") class D { fun foo(): String?? = null } diff --git a/idea/testData/quickfix/suppress/availability/afterMemberOfNestedSuppressForOuter.kt b/idea/testData/quickfix/suppress/availability/afterMemberOfNestedSuppressForOuter.kt index 20ddb337079..9d8a2736835 100644 --- a/idea/testData/quickfix/suppress/availability/afterMemberOfNestedSuppressForOuter.kt +++ b/idea/testData/quickfix/suppress/availability/afterMemberOfNestedSuppressForOuter.kt @@ -1,6 +1,6 @@ // "Suppress 'REDUNDANT_NULLABLE' for class C" "true" -[suppress("REDUNDANT_NULLABLE")] +@suppress("REDUNDANT_NULLABLE") class C { class D { fun foo(): String?? = null diff --git a/idea/testData/quickfix/suppress/availability/afterMemberSuppressForClass.kt b/idea/testData/quickfix/suppress/availability/afterMemberSuppressForClass.kt index edba48c9888..d922ce90577 100644 --- a/idea/testData/quickfix/suppress/availability/afterMemberSuppressForClass.kt +++ b/idea/testData/quickfix/suppress/availability/afterMemberSuppressForClass.kt @@ -1,6 +1,6 @@ // "Suppress 'REDUNDANT_NULLABLE' for class C" "true" -[suppress("REDUNDANT_NULLABLE")] +@suppress("REDUNDANT_NULLABLE") class C { fun foo(): String?? = null } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/availability/afterMemberSuppressForMember.kt b/idea/testData/quickfix/suppress/availability/afterMemberSuppressForMember.kt index a91eb852842..e66aeb0ee44 100644 --- a/idea/testData/quickfix/suppress/availability/afterMemberSuppressForMember.kt +++ b/idea/testData/quickfix/suppress/availability/afterMemberSuppressForMember.kt @@ -1,6 +1,6 @@ // "Suppress 'REDUNDANT_NULLABLE' for fun foo" "true" class C { - [suppress("REDUNDANT_NULLABLE")] + @suppress("REDUNDANT_NULLABLE") fun foo(): String?? = null } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/availability/beforeTopLevelFunctionAlreadySuppressed.kt b/idea/testData/quickfix/suppress/availability/beforeTopLevelFunctionAlreadySuppressed.kt index 5a3cb6d1d78..5559044033e 100644 --- a/idea/testData/quickfix/suppress/availability/beforeTopLevelFunctionAlreadySuppressed.kt +++ b/idea/testData/quickfix/suppress/availability/beforeTopLevelFunctionAlreadySuppressed.kt @@ -1,4 +1,4 @@ // "class com.intellij.codeInspection.SuppressIntentionAction" "false" -[suppress("REDUNDANT_NULLABLE")] +@suppress("REDUNDANT_NULLABLE") fun foo(): String?? = null \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/declarationKinds/afterClass.kt b/idea/testData/quickfix/suppress/declarationKinds/afterClass.kt index 15b0eb98386..999704754cd 100644 --- a/idea/testData/quickfix/suppress/declarationKinds/afterClass.kt +++ b/idea/testData/quickfix/suppress/declarationKinds/afterClass.kt @@ -1,6 +1,6 @@ // "Suppress 'REDUNDANT_NULLABLE' for class C" "true" -[suppress("REDUNDANT_NULLABLE")] +@suppress("REDUNDANT_NULLABLE") class C { var foo: String?? = null } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/declarationKinds/afterClassObject.kt b/idea/testData/quickfix/suppress/declarationKinds/afterClassObject.kt index b037ee41442..b974751f96f 100644 --- a/idea/testData/quickfix/suppress/declarationKinds/afterClassObject.kt +++ b/idea/testData/quickfix/suppress/declarationKinds/afterClassObject.kt @@ -1,7 +1,7 @@ // "Suppress 'REDUNDANT_NULLABLE' for companion object Companion of C" "true" class C { - [suppress("REDUNDANT_NULLABLE")] + @suppress("REDUNDANT_NULLABLE") companion object { var foo: String?? = null } diff --git a/idea/testData/quickfix/suppress/declarationKinds/afterEnumEntry.kt b/idea/testData/quickfix/suppress/declarationKinds/afterEnumEntry.kt index b4441394dd9..60de146d975 100644 --- a/idea/testData/quickfix/suppress/declarationKinds/afterEnumEntry.kt +++ b/idea/testData/quickfix/suppress/declarationKinds/afterEnumEntry.kt @@ -1,7 +1,7 @@ // "Suppress 'REDUNDANT_NULLABLE' for enum entry A" "true" enum class E { - [suppress("REDUNDANT_NULLABLE")] + @suppress("REDUNDANT_NULLABLE") A { fun foo(): String?? = null } diff --git a/idea/testData/quickfix/suppress/declarationKinds/afterFun.kt b/idea/testData/quickfix/suppress/declarationKinds/afterFun.kt index 5b773f9a5e3..27fddc94690 100644 --- a/idea/testData/quickfix/suppress/declarationKinds/afterFun.kt +++ b/idea/testData/quickfix/suppress/declarationKinds/afterFun.kt @@ -1,4 +1,4 @@ // "Suppress 'REDUNDANT_NULLABLE' for fun foo" "true" -[suppress("REDUNDANT_NULLABLE")] +@suppress("REDUNDANT_NULLABLE") fun foo(): String?? = null \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/declarationKinds/afterMultiVal.kt b/idea/testData/quickfix/suppress/declarationKinds/afterMultiVal.kt index f735fbca7e5..1722418d84f 100644 --- a/idea/testData/quickfix/suppress/declarationKinds/afterMultiVal.kt +++ b/idea/testData/quickfix/suppress/declarationKinds/afterMultiVal.kt @@ -1,7 +1,7 @@ // "Suppress 'REDUNDANT_NULLABLE' for val (a, b)" "true" fun foo() { - [suppress("REDUNDANT_NULLABLE")] + @suppress("REDUNDANT_NULLABLE") val (a, b) = Pair?, String>("", "") } diff --git a/idea/testData/quickfix/suppress/declarationKinds/afterMultiVar.kt b/idea/testData/quickfix/suppress/declarationKinds/afterMultiVar.kt index ada5a8a8dc8..35a6a0213b5 100644 --- a/idea/testData/quickfix/suppress/declarationKinds/afterMultiVar.kt +++ b/idea/testData/quickfix/suppress/declarationKinds/afterMultiVar.kt @@ -1,7 +1,7 @@ // "Suppress 'REDUNDANT_NULLABLE' for var (a, b)" "true" fun foo() { - [suppress("REDUNDANT_NULLABLE")] + @suppress("REDUNDANT_NULLABLE") var (a, b) = Pair?, String>("", "") } diff --git a/idea/testData/quickfix/suppress/declarationKinds/afterObject.kt b/idea/testData/quickfix/suppress/declarationKinds/afterObject.kt index 2921f8eb12c..8e11002a4a2 100644 --- a/idea/testData/quickfix/suppress/declarationKinds/afterObject.kt +++ b/idea/testData/quickfix/suppress/declarationKinds/afterObject.kt @@ -1,6 +1,6 @@ // "Suppress 'REDUNDANT_NULLABLE' for object C" "true" -[suppress("REDUNDANT_NULLABLE")] +@suppress("REDUNDANT_NULLABLE") object C { var foo: String?? = null } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/declarationKinds/afterParam.kt b/idea/testData/quickfix/suppress/declarationKinds/afterParam.kt index 3d54009f4a0..d4bb4bb5920 100644 --- a/idea/testData/quickfix/suppress/declarationKinds/afterParam.kt +++ b/idea/testData/quickfix/suppress/declarationKinds/afterParam.kt @@ -1,3 +1,3 @@ // "Suppress 'REDUNDANT_NULLABLE' for parameter p" "true" -fun foo([suppress("REDUNDANT_NULLABLE")] p: String??) = null \ No newline at end of file +fun foo(@suppress("REDUNDANT_NULLABLE") p: String??) = null \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/declarationKinds/afterTrait.kt b/idea/testData/quickfix/suppress/declarationKinds/afterTrait.kt index 42b30e21d0e..485f25f337c 100644 --- a/idea/testData/quickfix/suppress/declarationKinds/afterTrait.kt +++ b/idea/testData/quickfix/suppress/declarationKinds/afterTrait.kt @@ -1,6 +1,6 @@ // "Suppress 'REDUNDANT_NULLABLE' for trait C" "true" -[suppress("REDUNDANT_NULLABLE")] +@suppress("REDUNDANT_NULLABLE") trait C { var foo: String?? } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/declarationKinds/afterVal.kt b/idea/testData/quickfix/suppress/declarationKinds/afterVal.kt index 1fce4182587..784bcd927b1 100644 --- a/idea/testData/quickfix/suppress/declarationKinds/afterVal.kt +++ b/idea/testData/quickfix/suppress/declarationKinds/afterVal.kt @@ -1,4 +1,4 @@ // "Suppress 'REDUNDANT_NULLABLE' for val foo" "true" -[suppress("REDUNDANT_NULLABLE")] +@suppress("REDUNDANT_NULLABLE") val foo: String?? = null \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/declarationKinds/afterVar.kt b/idea/testData/quickfix/suppress/declarationKinds/afterVar.kt index 9c00afb3a7b..02373d91cad 100644 --- a/idea/testData/quickfix/suppress/declarationKinds/afterVar.kt +++ b/idea/testData/quickfix/suppress/declarationKinds/afterVar.kt @@ -1,4 +1,4 @@ // "Suppress 'REDUNDANT_NULLABLE' for var foo" "true" -[suppress("REDUNDANT_NULLABLE")] +@suppress("REDUNDANT_NULLABLE") var foo: String?? = null \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/errorRecovery/afterNonStringInSuppress.kt b/idea/testData/quickfix/suppress/errorRecovery/afterNonStringInSuppress.kt index 67732730a50..7b4f7ba4691 100644 --- a/idea/testData/quickfix/suppress/errorRecovery/afterNonStringInSuppress.kt +++ b/idea/testData/quickfix/suppress/errorRecovery/afterNonStringInSuppress.kt @@ -1,5 +1,5 @@ // "Suppress 'REDUNDANT_NULLABLE' for fun foo" "true" // ERROR: An integer literal does not conform to the expected type kotlin.String -[suppress(1, "REDUNDANT_NULLABLE")] +@suppress(1, "REDUNDANT_NULLABLE") fun foo(): String?? = null \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/errorRecovery/afterUnresolvedAnnotation.kt b/idea/testData/quickfix/suppress/errorRecovery/afterUnresolvedAnnotation.kt index 77dd6a293cc..378d48cc38d 100644 --- a/idea/testData/quickfix/suppress/errorRecovery/afterUnresolvedAnnotation.kt +++ b/idea/testData/quickfix/suppress/errorRecovery/afterUnresolvedAnnotation.kt @@ -1,5 +1,5 @@ // "Suppress 'REDUNDANT_NULLABLE' for fun foo" "true" // ERROR: Unresolved reference: ann -[suppress("REDUNDANT_NULLABLE")] +@suppress("REDUNDANT_NULLABLE") [ann] fun foo(): String?? = null \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/errorRecovery/beforeNonStringInSuppress.kt b/idea/testData/quickfix/suppress/errorRecovery/beforeNonStringInSuppress.kt index bfb91b60c43..2234ee3e4e9 100644 --- a/idea/testData/quickfix/suppress/errorRecovery/beforeNonStringInSuppress.kt +++ b/idea/testData/quickfix/suppress/errorRecovery/beforeNonStringInSuppress.kt @@ -1,5 +1,5 @@ // "Suppress 'REDUNDANT_NULLABLE' for fun foo" "true" // ERROR: An integer literal does not conform to the expected type kotlin.String -[suppress(1)] +@suppress(1) fun foo(): String?? = null \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/forStatement/afterAndAnd.kt b/idea/testData/quickfix/suppress/forStatement/afterAndAnd.kt index a37df2319c1..d5660c8026c 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterAndAnd.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterAndAnd.kt @@ -1,6 +1,6 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo() { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") (false!! && true) } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/forStatement/afterAnnotatedExpr.kt b/idea/testData/quickfix/suppress/forStatement/afterAnnotatedExpr.kt index a85aa8b91c4..dd2c9834a9c 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterAnnotatedExpr.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterAnnotatedExpr.kt @@ -1,7 +1,7 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo() { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") [ann] ""!! } diff --git a/idea/testData/quickfix/suppress/forStatement/afterAnnotatedExprWithSuppress.kt b/idea/testData/quickfix/suppress/forStatement/afterAnnotatedExprWithSuppress.kt index 68889c20fa5..0bc27a2b461 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterAnnotatedExprWithSuppress.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterAnnotatedExprWithSuppress.kt @@ -1,7 +1,7 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo() { - [suppress("Foo", "UNNECESSARY_NOT_NULL_ASSERTION")] ""!! + @suppress("Foo", "UNNECESSARY_NOT_NULL_ASSERTION") ""!! } annotation class ann \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/forStatement/afterArrayRead.kt b/idea/testData/quickfix/suppress/forStatement/afterArrayRead.kt index d2fa957531e..a3ddcdebba7 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterArrayRead.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterArrayRead.kt @@ -1,6 +1,6 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo(a: Array) { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") a[1!!] } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/forStatement/afterAs.kt b/idea/testData/quickfix/suppress/forStatement/afterAs.kt index 0dd72c7dfa4..d6d258c3033 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterAs.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterAs.kt @@ -1,6 +1,6 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo() { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") (""!! as String) } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/forStatement/afterAsSafe.kt b/idea/testData/quickfix/suppress/forStatement/afterAsSafe.kt index 22c6943ce20..1f4a52845ff 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterAsSafe.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterAsSafe.kt @@ -1,6 +1,6 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo() { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") (""!! as? String) } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/forStatement/afterAssign.kt b/idea/testData/quickfix/suppress/forStatement/afterAssign.kt index f41ea1c0726..2fa4875ed8c 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterAssign.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterAssign.kt @@ -3,6 +3,6 @@ fun foo() { var x = 0 - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") (x = 1!!) } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/forStatement/afterCall.kt b/idea/testData/quickfix/suppress/forStatement/afterCall.kt index 2c166794e08..c5baf7db502 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterCall.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterCall.kt @@ -1,7 +1,7 @@ // "Suppress 'REDUNDANT_NULLABLE' for statement " "true" fun foo() { - [suppress("REDUNDANT_NULLABLE")] + @suppress("REDUNDANT_NULLABLE") call("": String??) } diff --git a/idea/testData/quickfix/suppress/forStatement/afterColon.kt b/idea/testData/quickfix/suppress/forStatement/afterColon.kt index 2067973f446..b44e654a746 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterColon.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterColon.kt @@ -1,6 +1,6 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo() { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") (""!! : String) } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/forStatement/afterDoWhile.kt b/idea/testData/quickfix/suppress/forStatement/afterDoWhile.kt index e3a30136151..9a6d1936de2 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterDoWhile.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterDoWhile.kt @@ -1,7 +1,7 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo() { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") do {} while (true!!) } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/forStatement/afterDotQualified.kt b/idea/testData/quickfix/suppress/forStatement/afterDotQualified.kt index c6b01035778..1de6837b441 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterDotQualified.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterDotQualified.kt @@ -1,7 +1,7 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo(a: C) { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") a.foo(""!!) } diff --git a/idea/testData/quickfix/suppress/forStatement/afterElvis.kt b/idea/testData/quickfix/suppress/forStatement/afterElvis.kt index d85981f7708..0a96f61239e 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterElvis.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterElvis.kt @@ -1,6 +1,6 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo() { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") (1!! ?: 0) } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/forStatement/afterEqEq.kt b/idea/testData/quickfix/suppress/forStatement/afterEqEq.kt index 40d8d1dba8b..e4183e23617 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterEqEq.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterEqEq.kt @@ -1,6 +1,6 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo() { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") (1!! == 2) } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/forStatement/afterFor.kt b/idea/testData/quickfix/suppress/forStatement/afterFor.kt index fb8cefe80dc..bace1d833f8 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterFor.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterFor.kt @@ -1,7 +1,7 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo() { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") for (i in list()!!) {} } diff --git a/idea/testData/quickfix/suppress/forStatement/afterIf.kt b/idea/testData/quickfix/suppress/forStatement/afterIf.kt index b29393acb47..b992cc750da 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterIf.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterIf.kt @@ -1,6 +1,6 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo() { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") if (true!!) {} } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/forStatement/afterIn.kt b/idea/testData/quickfix/suppress/forStatement/afterIn.kt index 534481a2dca..d960ea643d6 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterIn.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterIn.kt @@ -1,6 +1,6 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo() { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") (1!! in (1..2)) } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/forStatement/afterInfix.kt b/idea/testData/quickfix/suppress/forStatement/afterInfix.kt index 9270d38caf5..071609d3f8d 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterInfix.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterInfix.kt @@ -1,6 +1,6 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo() { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") (1!! plus 2) } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/forStatement/afterIs.kt b/idea/testData/quickfix/suppress/forStatement/afterIs.kt index 68ac65bbd4c..b9cb6cb7207 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterIs.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterIs.kt @@ -1,6 +1,6 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo() { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") (""!! is String) } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/forStatement/afterLabeled.kt b/idea/testData/quickfix/suppress/forStatement/afterLabeled.kt index 44ea0b214bb..3cc222d5d7b 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterLabeled.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterLabeled.kt @@ -1,6 +1,6 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo() { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") label@""!! } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/forStatement/afterLess.kt b/idea/testData/quickfix/suppress/forStatement/afterLess.kt index b2750578d7b..f136a7f8ebc 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterLess.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterLess.kt @@ -1,6 +1,6 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo() { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") (1!! < 2) } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/forStatement/afterMul.kt b/idea/testData/quickfix/suppress/forStatement/afterMul.kt index 6a0cc3595d1..30a6a2752f1 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterMul.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterMul.kt @@ -1,6 +1,6 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo() { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") (1!! * 2) } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/forStatement/afterOrOr.kt b/idea/testData/quickfix/suppress/forStatement/afterOrOr.kt index 6e1d2f3ee6c..07609ecbc44 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterOrOr.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterOrOr.kt @@ -1,6 +1,6 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo() { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") (false!! || true) } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/forStatement/afterParenthesized.kt b/idea/testData/quickfix/suppress/forStatement/afterParenthesized.kt index 8e869e61845..12cec8bc52b 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterParenthesized.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterParenthesized.kt @@ -1,6 +1,6 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo() { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") (""!!) } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/forStatement/afterPlus.kt b/idea/testData/quickfix/suppress/forStatement/afterPlus.kt index c9829778901..82566ecaa0e 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterPlus.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterPlus.kt @@ -1,6 +1,6 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo() { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") (1!! + 2) } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/forStatement/afterPostfix.kt b/idea/testData/quickfix/suppress/forStatement/afterPostfix.kt index 38ede106bbf..e93274d2d71 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterPostfix.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterPostfix.kt @@ -1,6 +1,6 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo() { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") ""!! } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/forStatement/afterPostfixPlusPlus.kt b/idea/testData/quickfix/suppress/forStatement/afterPostfixPlusPlus.kt index 1128dc5dcc3..55d4790882f 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterPostfixPlusPlus.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterPostfixPlusPlus.kt @@ -2,7 +2,7 @@ fun foo() { var v = Box() - [suppress("REDUNDANT_NULLABLE")] + @suppress("REDUNDANT_NULLABLE") (v: Box?>)++ } diff --git a/idea/testData/quickfix/suppress/forStatement/afterPrefixPlusPlus.kt b/idea/testData/quickfix/suppress/forStatement/afterPrefixPlusPlus.kt index aa978c79247..21e4f654338 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterPrefixPlusPlus.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterPrefixPlusPlus.kt @@ -2,7 +2,7 @@ fun foo() { var v = Box() - [suppress("REDUNDANT_NULLABLE")] + @suppress("REDUNDANT_NULLABLE") ++(v: Box?>) } diff --git a/idea/testData/quickfix/suppress/forStatement/afterRange.kt b/idea/testData/quickfix/suppress/forStatement/afterRange.kt index f628da1d86f..21effd5d193 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterRange.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterRange.kt @@ -1,6 +1,6 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo() { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") (1!! .. 2) } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/forStatement/afterReturn.kt b/idea/testData/quickfix/suppress/forStatement/afterReturn.kt index 597c148d78c..d5fc185f640 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterReturn.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterReturn.kt @@ -1,6 +1,6 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo(): Any { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") return ""!! } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/forStatement/afterSafeQualified.kt b/idea/testData/quickfix/suppress/forStatement/afterSafeQualified.kt index 057dd485a2f..0e736cab053 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterSafeQualified.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterSafeQualified.kt @@ -1,7 +1,7 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo(a: C) { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") a?.foo(""!!) } diff --git a/idea/testData/quickfix/suppress/forStatement/afterSimpleName.kt b/idea/testData/quickfix/suppress/forStatement/afterSimpleName.kt index 05a699b0156..8525e9482d1 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterSimpleName.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterSimpleName.kt @@ -2,6 +2,6 @@ fun foo() { val a = 1 - [suppress("UNUSED_EXPRESSION")] + @suppress("UNUSED_EXPRESSION") a } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/forStatement/afterStringTemplate.kt b/idea/testData/quickfix/suppress/forStatement/afterStringTemplate.kt index 29548a60e5a..88e0c1bb62e 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterStringTemplate.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterStringTemplate.kt @@ -1,6 +1,6 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo() { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") "${""!!}" } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/forStatement/afterThrow.kt b/idea/testData/quickfix/suppress/forStatement/afterThrow.kt index 630786d2352..6d13d377494 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterThrow.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterThrow.kt @@ -1,6 +1,6 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo(): Any { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") throw Exception(""!!) } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/forStatement/afterTry.kt b/idea/testData/quickfix/suppress/forStatement/afterTry.kt index c32b69a5fe2..a5220673336 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterTry.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterTry.kt @@ -2,7 +2,7 @@ fun foo() { try { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") ""!! } finally { diff --git a/idea/testData/quickfix/suppress/forStatement/afterWhenExpressionEntry.kt b/idea/testData/quickfix/suppress/forStatement/afterWhenExpressionEntry.kt index b4e029e95c6..8a40d1aa075 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterWhenExpressionEntry.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterWhenExpressionEntry.kt @@ -1,7 +1,7 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo(a: Any) { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") when (a) { ""!! -> {} } diff --git a/idea/testData/quickfix/suppress/forStatement/afterWhenInEntry.kt b/idea/testData/quickfix/suppress/forStatement/afterWhenInEntry.kt index b6a897bc20c..675bb9fe743 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterWhenInEntry.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterWhenInEntry.kt @@ -1,7 +1,7 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo() { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") when (1) { in 1!!..2 -> {} } diff --git a/idea/testData/quickfix/suppress/forStatement/afterWhenIsEntry.kt b/idea/testData/quickfix/suppress/forStatement/afterWhenIsEntry.kt index 1a86673fb1e..01081d34a2d 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterWhenIsEntry.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterWhenIsEntry.kt @@ -1,7 +1,7 @@ // "Suppress 'REDUNDANT_NULLABLE' for statement " "true" fun foo() { - [suppress("REDUNDANT_NULLABLE")] + @suppress("REDUNDANT_NULLABLE") when ("") { is Any?? -> {} } diff --git a/idea/testData/quickfix/suppress/forStatement/afterWhenSubject.kt b/idea/testData/quickfix/suppress/forStatement/afterWhenSubject.kt index fdacaac9d0b..2a364fbf5f7 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterWhenSubject.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterWhenSubject.kt @@ -1,7 +1,7 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo() { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") when (""!!) { is Any -> {} } diff --git a/idea/testData/quickfix/suppress/forStatement/afterWhile.kt b/idea/testData/quickfix/suppress/forStatement/afterWhile.kt index 7fba63ef987..0ab4be08f0d 100644 --- a/idea/testData/quickfix/suppress/forStatement/afterWhile.kt +++ b/idea/testData/quickfix/suppress/forStatement/afterWhile.kt @@ -1,6 +1,6 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo() { - [suppress("UNNECESSARY_NOT_NULL_ASSERTION")] + @suppress("UNNECESSARY_NOT_NULL_ASSERTION") while (true!!) {} } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/forStatement/beforeAnnotatedExprWithSuppress.kt b/idea/testData/quickfix/suppress/forStatement/beforeAnnotatedExprWithSuppress.kt index 8b42c0736b8..3017b641a50 100644 --- a/idea/testData/quickfix/suppress/forStatement/beforeAnnotatedExprWithSuppress.kt +++ b/idea/testData/quickfix/suppress/forStatement/beforeAnnotatedExprWithSuppress.kt @@ -1,7 +1,7 @@ // "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true" fun foo() { - [suppress("Foo")] ""!! + @suppress("Foo") ""!! } annotation class ann \ No newline at end of file