A pair of "Suppress" changed from CAST_NEVER_SUCCEEDS to UNCHECKED_CAST
(cherry picked from commit 2ac8a66)
This commit is contained in:
committed by
Mikhail Glukhikh
parent
dbbc4ec281
commit
17a2a971c4
@@ -61,7 +61,7 @@ abstract class AbstractKtReference<T : KtElement>(element: T)
|
||||
|
||||
override fun bindToElement(element: PsiElement): PsiElement = throw IncorrectOperationException()
|
||||
|
||||
@Suppress("CAST_NEVER_SUCCEEDS")
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
override fun getVariants(): Array<Any> = PsiReference.EMPTY_ARRAY as Array<Any>
|
||||
|
||||
override fun isSoft(): Boolean = false
|
||||
|
||||
+1
-1
@@ -256,7 +256,7 @@ abstract class AbstractExtractionTest() : KotlinLightCodeInsightFixtureTestCase(
|
||||
|
||||
val extractionOptions = InTextDirectivesUtils.findListWithPrefixes(fileText, "// OPTIONS: ").let {
|
||||
if (it.isNotEmpty()) {
|
||||
@Suppress("CAST_NEVER_SUCCEEDS")
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
val args = it.map { it.toBoolean() }.toTypedArray() as Array<Any?>
|
||||
ExtractionOptions::class.java.constructors.first { it.parameterTypes.size == args.size }.newInstance(*args) as ExtractionOptions
|
||||
} else ExtractionOptions.DEFAULT
|
||||
|
||||
Reference in New Issue
Block a user