Fix warnings in stdlib/compiler/plugins/test code
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
+2
@@ -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);
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user