diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/FunctionDescriptorImpl.java b/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/FunctionDescriptorImpl.java index 01e64b9fdf1..f0df94e84be 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/FunctionDescriptorImpl.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/FunctionDescriptorImpl.java @@ -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; }