JetValueParameter.nullable is deprecated as it duplicates info in type field

This commit is contained in:
Alex Tkachman
2012-09-23 13:19:51 +02:00
parent b70cc84764
commit 4600990d52
5 changed files with 2 additions and 19 deletions
@@ -371,7 +371,6 @@ public class FunctionCodegen extends GenerationStateAware {
if (receiverParameter.exists()) {
JetValueParameterAnnotationWriter av = JetValueParameterAnnotationWriter.visitParameterAnnotation(mv, start++);
av.writeName("this$receiver");
av.writeNullable(receiverParameter.getType().isNullable());
av.writeReceiver();
if (kotlinParameterTypes.get(0) != null) {
av.writeType(kotlinParameterTypes.get(0).getKotlinSignature());
@@ -384,7 +383,6 @@ public class FunctionCodegen extends GenerationStateAware {
JetValueParameterAnnotationWriter av = JetValueParameterAnnotationWriter.visitParameterAnnotation(mv, i + start);
av.writeName(parameterDescriptor.getName().getName());
av.writeHasDefaultValue(parameterDescriptor.declaresDefaultValue());
av.writeNullable(parameterDescriptor.getType().isNullable());
if (kotlinParameterTypes.get(i) != null) {
av.writeType(kotlinParameterTypes.get(i + start).getKotlinSignature());
}
@@ -42,12 +42,6 @@ public class JetValueParameterAnnotationWriter {
mv.visitParameterAnnotation(n, JvmStdlibNames.JET_VALUE_PARAMETER.getDescriptor(), true));
}
public void writeNullable(boolean nullable) {
if (nullable) {
av.visit(JvmStdlibNames.JET_VALUE_PARAMETER_NULLABLE_FIELD, true);
}
}
public void writeReceiver() {
av.visit(JvmStdlibNames.JET_VALUE_PARAMETER_RECEIVER_FIELD, true);
}