From 8d1ef3ee6b90c20cfbfb1bee2eeca01e3e67f8f1 Mon Sep 17 00:00:00 2001 From: Stepan Koltsov Date: Sat, 16 Jun 2012 00:22:23 +0400 Subject: [PATCH] frontend: do not set FunctionDescriptorImpl.returnValue more than once --- .../jet/lang/descriptors/FunctionDescriptorImpl.java | 4 ++++ 1 file changed, 4 insertions(+) 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; }