[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
@@ -90,7 +90,7 @@ interface ConeTypeContext : TypeSystemContext, TypeSystemOptimizationContext, Ty
|
||||
is ConeClassLikeType -> fullyExpandedType(session)
|
||||
is ConeSimpleKotlinType -> this
|
||||
is ConeFlexibleType -> null
|
||||
else -> errorWithAttachment("Unknown simpleType: ${this::class.java}") {
|
||||
else -> errorWithAttachment("Unknown simpleType: ${this::class}") {
|
||||
withConeTypeEntry("type", this@asSimpleType as? ConeKotlinType)
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1198,7 +1198,7 @@ open class PsiRawFirBuilder(
|
||||
block = when (file) {
|
||||
is KtExpressionCodeFragment -> file.getContentElement()?.toFirBlock() ?: buildEmptyExpressionBlock()
|
||||
is KtBlockCodeFragment -> configureBlockWithoutBuilding(file.getContentElement()).build()
|
||||
else -> error("Unexpected code fragment type: " + file::class.java)
|
||||
else -> error("Unexpected code fragment type: ${file::class}")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2267,7 +2267,7 @@ open class PsiRawFirBuilder(
|
||||
is KtEscapeStringTemplateEntry -> KtNodeTypes.ESCAPE_STRING_TEMPLATE_ENTRY
|
||||
is KtSimpleNameStringTemplateEntry -> KtNodeTypes.SHORT_STRING_TEMPLATE_ENTRY
|
||||
is KtBlockStringTemplateEntry -> KtNodeTypes.LONG_STRING_TEMPLATE_ENTRY
|
||||
else -> errorWithAttachment("invalid node type ${element::class.java}") {
|
||||
else -> errorWithAttachment("invalid node type ${element::class}") {
|
||||
withPsiEntry("element", element)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user