FIR initializer: don't report type mismatch in SomeInt = Int case
This commit is contained in:
@@ -76,6 +76,9 @@ val ConeKotlinType.isNonPrimitiveArray: Boolean
|
||||
private val builtinUnsignedTypes = setOf(StandardClassIds.UInt, StandardClassIds.UByte, StandardClassIds.ULong, StandardClassIds.UShort)
|
||||
val ConeKotlinType.isUnsignedTypeOrNullableUnsignedType: Boolean get() = isAnyOfBuiltinType(builtinUnsignedTypes)
|
||||
|
||||
private val builtinIntegerTypes = setOf(StandardClassIds.Int, StandardClassIds.Byte, StandardClassIds.Long, StandardClassIds.Short)
|
||||
val ConeKotlinType.isIntegerTypeOrNullableIntegerTypeOfAnySize: Boolean get() = isAnyOfBuiltinType(builtinIntegerTypes)
|
||||
|
||||
private fun ConeKotlinType.isBuiltinType(classId: ClassId, isNullable: Boolean): Boolean {
|
||||
if (this !is ConeClassLikeType) return false
|
||||
return lookupTag.classId == classId && type.isNullable == isNullable
|
||||
|
||||
Reference in New Issue
Block a user