Replace equals with == involving FP types: handle possible smart casts

This fixes two relevant tests with smart casts
#KT-25933 Fixed
This commit is contained in:
Mikhail Glukhikh
2018-10-09 14:47:01 +03:00
parent 04cadf3f58
commit 6be65e7d1a
6 changed files with 67 additions and 5 deletions
@@ -986,6 +986,10 @@ public abstract class KotlinBuiltIns {
return isConstructedFromGivenClassAndNotNullable(type, FQ_NAMES.number);
}
public static boolean isNumberOrNullableNumber(@NotNull KotlinType type) {
return isConstructedFromGivenClass(type, FQ_NAMES.number);
}
public static boolean isChar(@NotNull KotlinType type) {
return isConstructedFromGivenClassAndNotNullable(type, FQ_NAMES._char);
}