Add quickfix to add 'toString' (#866)

Fixes #KT-12121
This commit is contained in:
Kirill Rakhman
2016-04-28 11:15:39 +02:00
committed by Dmitry Jemerov
parent a51fe9a9b0
commit 2629d23576
12 changed files with 159 additions and 0 deletions
@@ -879,6 +879,14 @@ public abstract class KotlinBuiltIns {
return type != null && isNotNullConstructedFromGivenClass(type, FQ_NAMES.string);
}
public static boolean isCharSequenceOrNullableCharSequence(@Nullable KotlinType type) {
return type != null && isConstructedFromGivenClass(type, FQ_NAMES.charSequence);
}
public static boolean isStringOrNullableString(@Nullable KotlinType type) {
return type != null && isConstructedFromGivenClass(type, FQ_NAMES.string);
}
public static boolean isCollectionOrNullableCollection(@NotNull KotlinType type) {
return isConstructedFromGivenClass(type, FQ_NAMES._collection);
}