From 1aadf98951ed6d073a9e3f3b0d74a93ce99e8af6 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Fri, 9 Mar 2012 17:35:29 +0400 Subject: [PATCH] Working around a problem with shallow analysis --- .../backend/src/org/jetbrains/jet/codegen/ClosureAnnotator.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/backend/src/org/jetbrains/jet/codegen/ClosureAnnotator.java b/compiler/backend/src/org/jetbrains/jet/codegen/ClosureAnnotator.java index b38955b5878..2b09b3503df 100644 --- a/compiler/backend/src/org/jetbrains/jet/codegen/ClosureAnnotator.java +++ b/compiler/backend/src/org/jetbrains/jet/codegen/ClosureAnnotator.java @@ -225,6 +225,8 @@ public class ClosureAnnotator { public void visitFunctionLiteralExpression(JetFunctionLiteralExpression expression) { String name = recordAnonymousClass(expression.getFunctionLiteral()); FunctionDescriptor declarationDescriptor = (FunctionDescriptor) bindingContext.get(BindingContext.DECLARATION_TO_DESCRIPTOR, expression); + // working around a problem with shallow analysis + if (declarationDescriptor == null) return; ClassDescriptor classDescriptor = classDescriptorForFunctionDescriptor(declarationDescriptor, name); recordName(classDescriptor, name); recordEnclosing(classDescriptor);