Renamed JetType.isNullable() to isMarkedNullable()
This commit is contained in:
@@ -216,7 +216,7 @@ public abstract class AnnotationCodegen {
|
||||
|
||||
private static boolean isBareTypeParameterWithNullableUpperBound(@NotNull JetType type) {
|
||||
ClassifierDescriptor classifier = type.getConstructor().getDeclarationDescriptor();
|
||||
return !type.isNullable() && classifier instanceof TypeParameterDescriptor && TypeUtils.hasNullableSuperType(type);
|
||||
return !type.isMarkedNullable() && classifier instanceof TypeParameterDescriptor && TypeUtils.hasNullableSuperType(type);
|
||||
}
|
||||
|
||||
public void generateAnnotationDefaultValue(@NotNull CompileTimeConstant value, @NotNull JetType expectedType) {
|
||||
|
||||
@@ -3863,7 +3863,7 @@ The "returned" value of try expression with no finally is either the last expres
|
||||
if (leaveExpressionOnStack) {
|
||||
v.dup();
|
||||
}
|
||||
if (jetType.isNullable()) {
|
||||
if (jetType.isMarkedNullable()) {
|
||||
Label nope = new Label();
|
||||
Label end = new Label();
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ import com.intellij.util.containers.ContainerUtil;
|
||||
import kotlin.Function1;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jet.backend.common.CodegenUtil;
|
||||
import org.jetbrains.jet.codegen.binding.CodegenBinding;
|
||||
import org.jetbrains.jet.codegen.bridges.Bridge;
|
||||
import org.jetbrains.jet.codegen.bridges.BridgesPackage;
|
||||
@@ -71,7 +70,6 @@ import static org.jetbrains.jet.codegen.JvmSerializationBindings.*;
|
||||
import static org.jetbrains.jet.codegen.binding.CodegenBinding.isLocalNamedFun;
|
||||
import static org.jetbrains.jet.lang.descriptors.CallableMemberDescriptor.Kind.DECLARATION;
|
||||
import static org.jetbrains.jet.lang.resolve.DescriptorToSourceUtils.callableDescriptorToDeclaration;
|
||||
import static org.jetbrains.jet.lang.resolve.DescriptorToSourceUtils.classDescriptorToDeclaration;
|
||||
import static org.jetbrains.jet.lang.resolve.DescriptorUtils.isFunctionLiteral;
|
||||
import static org.jetbrains.jet.lang.resolve.DescriptorUtils.isTrait;
|
||||
import static org.jetbrains.jet.lang.resolve.java.AsmTypeConstants.OBJECT_TYPE;
|
||||
@@ -228,7 +226,7 @@ public class FunctionCodegen extends ParentCodegenAware {
|
||||
if (kind == JvmMethodParameterKind.VALUE) {
|
||||
ValueParameterDescriptor descriptor = descriptors.next();
|
||||
name = descriptor.getName().asString();
|
||||
nullableType = descriptor.getType().isNullable();
|
||||
nullableType = descriptor.getType().isMarkedNullable();
|
||||
}
|
||||
else {
|
||||
String lowercaseKind = kind.name().toLowerCase();
|
||||
@@ -241,7 +239,7 @@ public class FunctionCodegen extends ParentCodegenAware {
|
||||
|
||||
if (kind == JvmMethodParameterKind.RECEIVER) {
|
||||
ReceiverParameterDescriptor receiver = functionDescriptor.getExtensionReceiverParameter();
|
||||
nullableType = receiver == null || receiver.getType().isNullable();
|
||||
nullableType = receiver == null || receiver.getType().isMarkedNullable();
|
||||
}
|
||||
else {
|
||||
nullableType = true;
|
||||
|
||||
@@ -285,7 +285,7 @@ public abstract class MemberCodegen<T extends JetElement/* TODO: & JetDeclaratio
|
||||
|
||||
private static boolean skipDefaultValue(@NotNull PropertyDescriptor propertyDescriptor, Object value, @NotNull Type type) {
|
||||
if (isPrimitive(type)) {
|
||||
if (!propertyDescriptor.getType().isNullable() && value instanceof Number) {
|
||||
if (!propertyDescriptor.getType().isMarkedNullable() && value instanceof Number) {
|
||||
if (type == Type.INT_TYPE && ((Number) value).intValue() == 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -54,11 +54,11 @@ public class RangeCodegenUtil {
|
||||
private RangeCodegenUtil() {}
|
||||
|
||||
public static boolean isRange(JetType rangeType) {
|
||||
return !rangeType.isNullable() && getPrimitiveRangeElementType(rangeType) != null;
|
||||
return !rangeType.isMarkedNullable() && getPrimitiveRangeElementType(rangeType) != null;
|
||||
}
|
||||
|
||||
public static boolean isProgression(JetType rangeType) {
|
||||
return !rangeType.isNullable() && getPrimitiveProgressionElementType(rangeType) != null;
|
||||
return !rangeType.isMarkedNullable() && getPrimitiveProgressionElementType(rangeType) != null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
Reference in New Issue
Block a user