Replace test assertions in the prod code with require
This commit is contained in:
@@ -37,7 +37,7 @@ import org.jetbrains.kotlin.resolve.calls.callUtil.getResolvedCall
|
||||
import org.jetbrains.kotlin.resolve.calls.model.ArgumentMatch
|
||||
import org.jetbrains.kotlin.types.expressions.OperatorConventions
|
||||
import java.util.*
|
||||
import kotlin.test.assertTrue
|
||||
import kotlin.text.Regex
|
||||
|
||||
// NOTE: in this file we collect only Kotlin-specific methods working with PSI and not modifying it
|
||||
|
||||
@@ -226,7 +226,7 @@ public fun StubBasedPsiElementBase<out KotlinClassOrObjectStub<out KtClassOrObje
|
||||
}
|
||||
}
|
||||
|
||||
assertTrue(this is KtClassOrObject)
|
||||
require(this is KtClassOrObject) { "it should be ${KtClassOrObject::class} but it is a ${this.javaClass.name}" }
|
||||
|
||||
val stub = getStub()
|
||||
if (stub != null) {
|
||||
@@ -438,4 +438,5 @@ fun checkReservedPrefixWord(sink: DiagnosticSink, element: PsiElement, word: Str
|
||||
KtPsiUtil.getPreviousWord(element, word)?.let {
|
||||
sink.report(Errors.UNSUPPORTED.on(it, message))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user