Fix "Should be replaced with Kotlin function" warnings
This commit is contained in:
@@ -202,7 +202,7 @@ object JavaToKotlinClassMap : PlatformToKotlinClassMap {
|
||||
|
||||
val kotlinMutableAnalogFqName = readOnlyToMutable[kotlinAnalog.fqNameUnsafe] ?: return setOf(kotlinAnalog)
|
||||
|
||||
return Arrays.asList(kotlinAnalog, builtIns.getBuiltInClassByFqName(kotlinMutableAnalogFqName))
|
||||
return listOf(kotlinAnalog, builtIns.getBuiltInClassByFqName(kotlinMutableAnalogFqName))
|
||||
}
|
||||
|
||||
override fun mapPlatformClass(classDescriptor: ClassDescriptor): Collection<ClassDescriptor> {
|
||||
|
||||
@@ -91,7 +91,7 @@ class CharValue(value: Char) : IntegerValueConstant<Char>(value) {
|
||||
//TODO: KT-8507
|
||||
12.toChar() -> "\\f"
|
||||
'\r' -> "\\r"
|
||||
else -> if (isPrintableUnicode(c)) Character.toString(c) else "?"
|
||||
else -> if (isPrintableUnicode(c)) c.toString() else "?"
|
||||
}
|
||||
|
||||
private fun isPrintableUnicode(c: Char): Boolean {
|
||||
|
||||
@@ -18,6 +18,7 @@ import org.jetbrains.kotlin.types.model.*
|
||||
import org.jetbrains.kotlin.types.model.CaptureStatus
|
||||
import org.jetbrains.kotlin.types.typeUtil.asTypeProjection
|
||||
import org.jetbrains.kotlin.types.typeUtil.contains
|
||||
import kotlin.math.max
|
||||
|
||||
interface ClassicTypeSystemContext : TypeSystemInferenceExtensionContext {
|
||||
override fun TypeConstructorMarker.isDenotable(): Boolean {
|
||||
@@ -470,7 +471,7 @@ private fun singleBestRepresentative(collection: Collection<KotlinType>) = colle
|
||||
internal fun UnwrappedType.typeDepthInternal() =
|
||||
when (this) {
|
||||
is SimpleType -> typeDepthInternal()
|
||||
is FlexibleType -> Math.max(lowerBound.typeDepthInternal(), upperBound.typeDepthInternal())
|
||||
is FlexibleType -> max(lowerBound.typeDepthInternal(), upperBound.typeDepthInternal())
|
||||
}
|
||||
|
||||
internal fun SimpleType.typeDepthInternal(): Int {
|
||||
|
||||
Reference in New Issue
Block a user