Clarified assert for EA-45243.

This commit is contained in:
Evgeny Gerashchenko
2014-10-09 20:49:55 +04:00
parent 27238a470a
commit ad1b460bea
@@ -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);