frontend: do not set FunctionDescriptorImpl.returnValue more than once

This commit is contained in:
Stepan Koltsov
2012-06-16 00:22:23 +04:00
parent 3fd757e097
commit 8d1ef3ee6b
@@ -113,6 +113,10 @@ public abstract class FunctionDescriptorImpl extends DeclarationDescriptorImpl i
}
public void setReturnType(@NotNull JetType unsubstitutedReturnType) {
if (this.unsubstitutedReturnType != null) {
// TODO: uncomment and fix tests
//throw new IllegalStateException("returnType already set");
}
this.unsubstitutedReturnType = unsubstitutedReturnType;
}