Fix warnings in stdlib/compiler/plugins/test code

This commit is contained in:
Alexander Udalov
2020-11-26 21:25:01 +01:00
parent b3d85e656e
commit 221f44da5f
48 changed files with 109 additions and 101 deletions
@@ -17,7 +17,7 @@ class ActualDiagnostic constructor(val diagnostic: Diagnostic, override val plat
TextDiagnostic.InferenceCompatibility.OLD
override val name: String
get() = diagnostic.factory.name!!
get() = diagnostic.factory.name
val file: PsiFile
get() = diagnostic.psiFile
@@ -205,7 +205,7 @@ object DebugInfoUtil {
}
abstract class DebugInfoReporter {
fun preProcessReference(expression: KtReferenceExpression) {
fun preProcessReference(@Suppress("UNUSED_PARAMETER") expression: KtReferenceExpression) {
// do nothing
}
@@ -18,6 +18,7 @@ package org.jetbrains.kotlin.diagnostics;
import com.intellij.openapi.util.TextRange;
import com.intellij.psi.PsiElement;
import kotlin.DeprecationLevel;
import java.util.List;
@@ -43,6 +44,7 @@ public abstract class DiagnosticFactoryWithPsiElement<E extends PsiElement, D ex
@SuppressWarnings("MethodOverloadsMethodOfSuperclass")
@Deprecated
@kotlin.Deprecated(message = "Use `cast` from the superclass.", level = DeprecationLevel.HIDDEN)
// ABI-compatibility only (used in Android plugin)
public D cast(Diagnostic d) {
return super.cast(d);
@@ -164,7 +164,7 @@ abstract class KotlinSuppressCache {
companion object {
private fun getDiagnosticSuppressKey(diagnostic: Diagnostic): String =
diagnostic.factory.name!!.toLowerCase()
diagnostic.factory.name.toLowerCase()
private fun isSuppressedByStrings(key: String, strings: Set<String>, severity: Severity): Boolean =
severity == Severity.WARNING && "warnings" in strings || key in strings