Chars are not promoted to Int on comparisons

This commit is contained in:
Dmitry Petrov
2018-02-26 15:30:11 +03:00
parent 4bb6c61a5a
commit 8fbdf52d34
11 changed files with 230 additions and 3 deletions
@@ -71,7 +71,8 @@ fun KotlinType.isDouble() = KotlinBuiltIns.isDouble(this)
fun KotlinType.isPrimitiveNumberOrNullableType(): Boolean =
KotlinBuiltIns.isPrimitiveTypeOrNullablePrimitiveType(this) &&
!KotlinBuiltIns.isBooleanOrNullableBoolean(this)
!KotlinBuiltIns.isBooleanOrNullableBoolean(this) &&
!KotlinBuiltIns.isCharOrNullableChar(this)
fun KotlinType.isTypeParameter(): Boolean = TypeUtils.isTypeParameter(this)