[Analysis API, FIR] migrate ::class.java -> ::class inside error messages
They seem to provide similar results and the `.java` part is redundant
This commit is contained in:
committed by
Space Team
parent
24db4e62f5
commit
08400d930f
+1
-1
@@ -31,7 +31,7 @@ abstract class AbstractHLExpressionTypeTest : AbstractAnalysisApiSingleFileTest(
|
||||
is KtExpression -> selected
|
||||
is KtValueArgument -> selected.getArgumentExpression()
|
||||
else -> null
|
||||
} ?: error("expect an expression but got ${selected.text}, ${selected::class.java}")
|
||||
} ?: error("expect an expression but got ${selected.text}, ${selected::class}")
|
||||
val type = executeOnPooledThreadInReadAction {
|
||||
analyseForTest(expression) { expression.getKtType()?.render(renderer, position = Variance.INVARIANT) }
|
||||
}
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ abstract class AbstractAnalysisApiExpressionPsiTypeProviderTest : AbstractAnalys
|
||||
val declarationAtCaret = when (val element = testServices.expressionMarkerProvider.getSelectedElement(ktFile)) {
|
||||
is KtExpression -> element
|
||||
is KtValueArgument -> element.getArgumentExpression()!!
|
||||
else -> error("Unexpected element: $element of ${element::class.java}")
|
||||
else -> error("Unexpected element: $element of ${element::class}")
|
||||
}
|
||||
val containingDeclaration = declarationAtCaret.parentOfType<KtDeclaration>()
|
||||
?: error("Can't find containing declaration for $declarationAtCaret")
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ internal fun KtAnalysisSession.stringRepresentation(any: Any): String = with(any
|
||||
is KtConstructorSymbol -> "<constructor>"
|
||||
is KtPropertyGetterSymbol -> callableIdIfNonLocal ?: "<getter>"
|
||||
is KtPropertySetterSymbol -> callableIdIfNonLocal ?: "<setter>"
|
||||
else -> error("unexpected symbol kind in KtCall: ${this@with::class.java}")
|
||||
else -> error("unexpected symbol kind in KtCall: ${this@with::class}")
|
||||
}
|
||||
)
|
||||
append("(")
|
||||
|
||||
Reference in New Issue
Block a user