From ad1b460bea7009915cfd004c7c233f153f9bf74d Mon Sep 17 00:00:00 2001 From: Evgeny Gerashchenko Date: Thu, 9 Oct 2014 20:49:55 +0400 Subject: [PATCH] Clarified assert for EA-45243. --- .../jet/plugin/intentions/SpecifyTypeExplicitlyAction.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/idea/src/org/jetbrains/jet/plugin/intentions/SpecifyTypeExplicitlyAction.java b/idea/src/org/jetbrains/jet/plugin/intentions/SpecifyTypeExplicitlyAction.java index 5bd9494fbf9..da8de39f60d 100644 --- a/idea/src/org/jetbrains/jet/plugin/intentions/SpecifyTypeExplicitlyAction.java +++ b/idea/src/org/jetbrains/jet/plugin/intentions/SpecifyTypeExplicitlyAction.java @@ -155,7 +155,8 @@ public class SpecifyTypeExplicitlyAction extends PsiElementBaseIntentionAction { @NotNull final JetCallableDeclaration declaration, @NotNull JetType exprType ) { - assert !exprType.isError() : "Unexpected error type: " + declaration.getText(); + assert !exprType.isError() : "Unexpected error type, should have been checked before: " + + JetPsiUtil.getElementTextWithContext(declaration) + ", type = " + exprType; ClassifierDescriptor descriptor = exprType.getConstructor().getDeclarationDescriptor(); boolean isAnonymous = descriptor != null && DescriptorUtils.isAnonymousObject(descriptor);