use of org.jetbrains.kotlin.resolve.constants.IntegerValueTypeConstructor in project kotlin by JetBrains.
the class ArgumentTypeResolver method updateResultArgumentTypeIfNotDenotable.
@Nullable
public KotlinType updateResultArgumentTypeIfNotDenotable(@NotNull ResolutionContext context, @NotNull KtExpression expression) {
KotlinType type = context.trace.getType(expression);
if (type != null && !type.getConstructor().isDenotable()) {
if (type.getConstructor() instanceof IntegerValueTypeConstructor) {
IntegerValueTypeConstructor constructor = (IntegerValueTypeConstructor) type.getConstructor();
KotlinType primitiveType = TypeUtils.getPrimitiveNumberType(constructor, context.expectedType);
constantExpressionEvaluator.updateNumberType(primitiveType, expression, context.statementFilter, context.trace);
return primitiveType;
}
}
return null;
}
Aggregations