isBoolean() moved to KotlinBuiltIns
This commit is contained in:
@@ -33,6 +33,7 @@ import org.jetbrains.jet.lang.resolve.name.FqNameUnsafe;
|
||||
import org.jetbrains.jet.lang.resolve.name.Name;
|
||||
import org.jetbrains.jet.lang.resolve.scopes.JetScope;
|
||||
import org.jetbrains.jet.lang.types.*;
|
||||
import org.jetbrains.jet.lang.types.checker.JetTypeChecker;
|
||||
import org.jetbrains.jet.storage.LockBasedStorageManager;
|
||||
|
||||
import java.io.InputStream;
|
||||
@@ -886,6 +887,10 @@ public class KotlinBuiltIns {
|
||||
return isNotNullConstructedFromGivenClass(type, FQ_NAMES.unit);
|
||||
}
|
||||
|
||||
public boolean isBooleanOrSubtype(@NotNull JetType type) {
|
||||
return JetTypeChecker.DEFAULT.isSubtypeOf(type, getBooleanType());
|
||||
}
|
||||
|
||||
public static boolean isString(@Nullable JetType type) {
|
||||
return type != null && isNotNullConstructedFromGivenClass(type, FQ_NAMES.string);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user