Fix NPE in DebuggerUtils

#EA-69703 - assert: DebuggerUtils.analyzeElementWithInline
This commit is contained in:
Natalia Ukhorskaya
2015-09-04 16:51:24 +03:00
parent 3aa7528c8f
commit ff8b7b4276
@@ -277,11 +277,11 @@ public class DebuggerUtils {
List<BindingContext> innerContexts = new ArrayList<BindingContext>();
for (JetNamedFunction inlineFunctions : collectedElements) {
JetExpression body = inlineFunctions.getBodyExpression();
assert body != null : "Inline function should have a body: " + inlineFunctions.getText();
BindingContext bindingContextForFunction = resolutionFacade.analyze(body, BodyResolveMode.FULL);
innerContexts.add(analyzeElementWithInline(resolutionFacade, bindingContextForFunction, inlineFunctions, deep + 1,
analyzedElements, analyzeInlineFunctions));
if (body != null) {
BindingContext bindingContextForFunction = resolutionFacade.analyze(body, BodyResolveMode.FULL);
innerContexts.add(analyzeElementWithInline(resolutionFacade, bindingContextForFunction, inlineFunctions, deep + 1,
analyzedElements, analyzeInlineFunctions));
}
}
innerContexts.add(bindingContext);