diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/lazy/ResolveSession.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/lazy/ResolveSession.java index 13771beddf7..1702c014754 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/lazy/ResolveSession.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/lazy/ResolveSession.java @@ -435,7 +435,8 @@ public class ResolveSession implements KotlinCodeAnalyzer { } }, null); if (result == null) { - throw new IllegalStateException("No descriptor resolved for " + declaration + " " + declaration.getText()); + throw new IllegalStateException("No descriptor resolved for " + declaration + ":\n" + + JetPsiUtil.getElementTextWithContext(declaration)); } return result; }