Beispiel #1
0
 private static boolean isInlinableParameter(@NotNull CallableDescriptor descriptor) {
   JetType type = descriptor.getReturnType();
   return type != null
       && KotlinBuiltIns.isExactFunctionOrExtensionFunctionType(type)
       && !type.isMarkedNullable()
       && !InlineUtil.hasNoinlineAnnotation(descriptor);
 }
Beispiel #2
0
 public static boolean isNullableAny(@NotNull JetType type) {
   return isAnyOrNullableAny(type) && type.isMarkedNullable();
 }
Beispiel #3
0
 public static boolean isNullableNothing(@NotNull JetType type) {
   return isNothingOrNullableNothing(type) && type.isMarkedNullable();
 }
Beispiel #4
0
 private static boolean isNotNullConstructedFromGivenClass(
     @NotNull JetType type, @NotNull FqNameUnsafe fqName) {
   return !type.isMarkedNullable() && isConstructedFromGivenClass(type, fqName);
 }
Beispiel #5
0
 public static boolean isPrimitiveType(@NotNull JetType type) {
   ClassifierDescriptor descriptor = type.getConstructor().getDeclarationDescriptor();
   return !type.isMarkedNullable()
       && descriptor != null
       && FQ_NAMES.primitiveTypes.contains(DescriptorUtils.getFqName(descriptor));
 }