returnTypeNullable in flags duplicates info in returnType annotation field

This commit is contained in:
Alex Tkachman
2012-09-23 12:22:57 +02:00
parent 1ec32810f4
commit edc0bf0b15
6 changed files with 22 additions and 31 deletions
@@ -356,8 +356,6 @@ public class FunctionCodegen extends GenerationStateAware {
}
kotlinFlags |= DescriptorKindUtils.kindToFlags(functionDescriptor.getKind());
//noinspection ConstantConditions
if (functionDescriptor.getReturnType().isNullable())
kotlinFlags |= JvmStdlibNames.FLAG_NULLABLE_RETURN_TYPE_BIT;
aw.writeFlags(kotlinFlags);
aw.writeTypeParameters(jvmSignature.getKotlinTypeParameter());
aw.writeReturnType(jvmSignature.getKotlinReturnType());
@@ -1225,8 +1225,6 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
else {
JetType returnType = fun.getReturnType();
assert returnType != null;
if (returnType.isNullable())
kotlinFlags |= JvmStdlibNames.FLAG_NULLABLE_RETURN_TYPE_BIT;
aw.writeTypeParameters(jvmSignature.getKotlinTypeParameter());
aw.writeReturnType(jvmSignature.getKotlinReturnType());
}