use of org.jetbrains.kotlin.builtins.PrimitiveType in project kotlin by JetBrains.
the class PatternTranslator method equalityType.
@NotNull
private static EqualityType equalityType(@NotNull KotlinType type) {
DeclarationDescriptor descriptor = type.getConstructor().getDeclarationDescriptor();
if (!(descriptor instanceof ClassDescriptor))
return EqualityType.GENERAL;
PrimitiveType primitive = KotlinBuiltIns.getPrimitiveTypeByFqName(DescriptorUtilsKt.getFqNameUnsafe(descriptor));
if (primitive == null)
return EqualityType.GENERAL;
return primitive == PrimitiveType.LONG ? EqualityType.LONG : EqualityType.PRIMITIVE;
}
use of org.jetbrains.kotlin.builtins.PrimitiveType in project kotlin by JetBrains.
the class ProgressionIteratorBasicValue method byProgressionClassType.
@Nullable
public static ProgressionIteratorBasicValue byProgressionClassType(@NotNull Type progressionClassType) {
FqName classFqName = new FqName(progressionClassType.getClassName());
PrimitiveType elementType = RangeCodegenUtil.getPrimitiveRangeOrProgressionElementType(classFqName);
return ITERATOR_VALUE_BY_ELEMENT_PRIMITIVE_TYPE.get(elementType);
}
Aggregations