diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/ClosureCodegen.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/ClosureCodegen.java index a566adc40c3..42ca86dc3ae 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/ClosureCodegen.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/ClosureCodegen.java @@ -203,7 +203,7 @@ public class ClosureCodegen extends MemberCodegen { @Override protected void done() { - writeOuterClassAndEnclosingMethod(classDescriptor); + writeOuterClassAndEnclosingMethod(); super.done(); } diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/ImplementationBodyCodegen.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/ImplementationBodyCodegen.java index 50887c1e04b..63390395732 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/ImplementationBodyCodegen.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/ImplementationBodyCodegen.java @@ -256,7 +256,7 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen { //JVMS7: A class must have an EnclosingMethod attribute if and only if it is a local class or an anonymous class. if (isAnonymousObject(descriptor) || !(descriptor.getContainingDeclaration() instanceof ClassOrPackageFragmentDescriptor)) { - writeOuterClassAndEnclosingMethod(descriptor); + writeOuterClassAndEnclosingMethod(); } } diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/MemberCodegen.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/MemberCodegen.java index 013313a17e7..c25498d7e9c 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/MemberCodegen.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/MemberCodegen.java @@ -20,10 +20,7 @@ import com.intellij.openapi.progress.ProcessCanceledException; import kotlin.Function0; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import org.jetbrains.kotlin.codegen.binding.CodegenBinding; -import org.jetbrains.kotlin.codegen.context.ClassContext; -import org.jetbrains.kotlin.codegen.context.CodegenContext; -import org.jetbrains.kotlin.codegen.context.FieldOwnerContext; +import org.jetbrains.kotlin.codegen.context.*; import org.jetbrains.kotlin.codegen.inline.InlineCodegenUtil; import org.jetbrains.kotlin.codegen.inline.NameGenerator; import org.jetbrains.kotlin.codegen.inline.ReifiedTypeParametersUsages; @@ -37,11 +34,15 @@ import org.jetbrains.kotlin.load.kotlin.PackagePartClassUtils; import org.jetbrains.kotlin.name.Name; import org.jetbrains.kotlin.name.SpecialNames; import org.jetbrains.kotlin.psi.*; -import org.jetbrains.kotlin.resolve.*; +import org.jetbrains.kotlin.resolve.BindingContext; +import org.jetbrains.kotlin.resolve.BindingContextUtils; +import org.jetbrains.kotlin.resolve.BindingTrace; +import org.jetbrains.kotlin.resolve.TemporaryBindingTrace; import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall; import org.jetbrains.kotlin.resolve.constants.CompileTimeConstant; import org.jetbrains.kotlin.resolve.constants.IntegerValueTypeConstant; import org.jetbrains.kotlin.resolve.constants.evaluate.ConstantExpressionEvaluator; +import org.jetbrains.kotlin.resolve.descriptorUtil.DescriptorUtilPackage; import org.jetbrains.kotlin.storage.LockBasedStorageManager; import org.jetbrains.kotlin.storage.NotNullLazyValue; import org.jetbrains.kotlin.types.ErrorUtils; @@ -249,41 +250,47 @@ public abstract class MemberCodegen context) { + CodegenContext outermost = context.getClassOrPackageParentContext(); + if (outermost instanceof ClassContext) { + return typeMapper.mapType(((ClassContext) outermost).getContextDescriptor()); } + else if (outermost instanceof PackageContext && !(outermost instanceof PackageFacadeContext)) { + return PackagePartClassUtils.getPackagePartType(element.getContainingJetFile()); + } + return null; + } + @Nullable + private Method computeEnclosingMethod(@NotNull CodegenContext context) { + if (context instanceof MethodContext) { + Method method = typeMapper.mapSignature(((MethodContext) context).getFunctionDescriptor()).getAsmMethod(); + if (!method.getName().equals("")) { + return method; + } + } return null; } @@ -304,7 +311,9 @@ public abstract class MemberCodegen"), SYNTHESIZED, NO_SOURCE); clInit.initialize(null, null, Collections.emptyList(), - Collections.emptyList(), null, null, Visibilities.PRIVATE); + Collections.emptyList(), + DescriptorUtilPackage.getModule(descriptor).getBuiltIns().getUnitType(), + null, Visibilities.PRIVATE); this.clInit = new ExpressionCodegen(mv, new FrameMap(), Type.VOID_TYPE, context.intoFunction(clInit), state, this); } diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/context/MethodContext.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/context/MethodContext.java index d98cd986aff..9db5cff09be 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/context/MethodContext.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/context/MethodContext.java @@ -34,16 +34,21 @@ public class MethodContext extends CodegenContext { private Label methodStartLabel; private Label methodEndLabel; + // Note: in case of code inside property accessors, functionDescriptor will be that accessor, + // but CodegenContext#contextDescriptor will be the corresponding property + private final FunctionDescriptor functionDescriptor; + protected MethodContext( - @NotNull FunctionDescriptor contextDescriptor, + @NotNull FunctionDescriptor functionDescriptor, @NotNull OwnerKind contextKind, @NotNull CodegenContext parentContext, @Nullable MutableClosure closure, boolean isInliningLambda ) { - super(JvmCodegenUtil.getDirectMember(contextDescriptor), contextKind, parentContext, closure, + super(JvmCodegenUtil.getDirectMember(functionDescriptor), contextKind, parentContext, closure, parentContext.hasThisDescriptor() ? parentContext.getThisDescriptor() : null, null); this.isInliningLambda = isInliningLambda; + this.functionDescriptor = functionDescriptor; } @NotNull @@ -118,4 +123,8 @@ public class MethodContext extends CodegenContext { return isInliningLambda; } + @NotNull + public FunctionDescriptor getFunctionDescriptor() { + return functionDescriptor; + } } diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/enclosing/anonymousObjectInInlinedLambda.kt b/compiler/testData/codegen/boxWithStdlib/reflection/enclosing/anonymousObjectInInlinedLambda.kt new file mode 100644 index 00000000000..6744ff747e3 --- /dev/null +++ b/compiler/testData/codegen/boxWithStdlib/reflection/enclosing/anonymousObjectInInlinedLambda.kt @@ -0,0 +1,20 @@ +trait A { + fun f(): String +} + +inline fun foo(): A { + return object : A { + override fun f(): String { + return "OK" + } + } +} + +fun box(): String { + val y = foo() + + val enclosing = y.javaClass.getEnclosingMethod() + if (enclosing?.getName() != "foo") return "method: $enclosing" + + return y.f() +} diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambdaInClassObject.kt b/compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambdaInClassObject.kt new file mode 100644 index 00000000000..91d368ae3e1 --- /dev/null +++ b/compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambdaInClassObject.kt @@ -0,0 +1,25 @@ +class O { + class object { + // Currently we consider in class O as the enclosing method of this lambda, + // so we write outer class = O and enclosing method = null + val f = {} + } +} + +fun box(): String { + val javaClass = O.f.javaClass + + val enclosingMethod = javaClass.getEnclosingMethod() + if (enclosingMethod != null) return "method: $enclosingMethod" + + val enclosingConstructor = javaClass.getEnclosingConstructor() + if (enclosingConstructor != null) return "constructor: $enclosingConstructor" + + val enclosingClass = javaClass.getEnclosingClass() + if (enclosingClass?.getName() != "O") return "enclosing class: $enclosingClass" + + val declaringClass = javaClass.getDeclaringClass() + if (declaringClass != null) return "anonymous function has a declaring class: $declaringClass" + + return "OK" +} diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambdaInObjectDeclaration.kt b/compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambdaInObjectDeclaration.kt new file mode 100644 index 00000000000..7fb76f26102 --- /dev/null +++ b/compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambdaInObjectDeclaration.kt @@ -0,0 +1,21 @@ +object O { + val f = {} +} + +fun box(): String { + val javaClass = O.f.javaClass + + val enclosingMethod = javaClass.getEnclosingMethod() + if (enclosingMethod != null) return "method: $enclosingMethod" + + val enclosingConstructor = javaClass.getEnclosingConstructor() + if (enclosingConstructor == null) return "no enclosing constructor" + + val enclosingClass = javaClass.getEnclosingClass() + if (enclosingClass?.getName() != "O") return "enclosing class: $enclosingClass" + + val declaringClass = javaClass.getDeclaringClass() + if (declaringClass != null) return "anonymous function has a declaring class: $declaringClass" + + return "OK" +} diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxWithStdlibCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxWithStdlibCodegenTestGenerated.java index b7f96509760..7416868a3ae 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxWithStdlibCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxWithStdlibCodegenTestGenerated.java @@ -2444,143 +2444,142 @@ public class BlackBoxWithStdlibCodegenTestGenerated extends AbstractBlackBoxCode @TestMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing") @TestDataPath("$PROJECT_ROOT") - @InnerTestClasses({Enclosing.InsideLambda.class, Enclosing.Lambda.class}) @RunWith(JUnit3RunnerWithInners.class) public static class Enclosing extends AbstractBlackBoxCodegenTest { public void testAllFilesPresentInEnclosing() throws Exception { JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithStdlib/reflection/enclosing"), Pattern.compile("^(.+)\\.kt$"), true); } + @TestMetadata("anonymousObjectInInlinedLambda.kt") + public void testAnonymousObjectInInlinedLambda() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/anonymousObjectInInlinedLambda.kt"); + doTestWithStdlib(fileName); + } + + @TestMetadata("classInLambda.kt") + public void testClassInLambda() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/classInLambda.kt"); + doTestWithStdlib(fileName); + } + @TestMetadata("kt6368.kt") public void testKt6368() throws Exception { String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/kt6368.kt"); doTestWithStdlib(fileName); } + @TestMetadata("kt6691_lambdaInSamConstructor.kt") + public void testKt6691_lambdaInSamConstructor() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/kt6691_lambdaInSamConstructor.kt"); + doTestWithStdlib(fileName); + } + + @TestMetadata("lambdaInClassObject.kt") + public void testLambdaInClassObject() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambdaInClassObject.kt"); + doTestWithStdlib(fileName); + } + + @TestMetadata("lambdaInConstructor.kt") + public void testLambdaInConstructor() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambdaInConstructor.kt"); + doTestWithStdlib(fileName); + } + + @TestMetadata("lambdaInFunction.kt") + public void testLambdaInFunction() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambdaInFunction.kt"); + doTestWithStdlib(fileName); + } + + @TestMetadata("lambdaInLambda.kt") + public void testLambdaInLambda() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambdaInLambda.kt"); + doTestWithStdlib(fileName); + } + + @TestMetadata("lambdaInLocalClassConstructor.kt") + public void testLambdaInLocalClassConstructor() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambdaInLocalClassConstructor.kt"); + doTestWithStdlib(fileName); + } + + @TestMetadata("lambdaInLocalClassSuperCall.kt") + public void testLambdaInLocalClassSuperCall() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambdaInLocalClassSuperCall.kt"); + doTestWithStdlib(fileName); + } + + @TestMetadata("lambdaInLocalFunction.kt") + public void testLambdaInLocalFunction() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambdaInLocalFunction.kt"); + doTestWithStdlib(fileName); + } + + @TestMetadata("lambdaInMemberFunction.kt") + public void testLambdaInMemberFunction() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambdaInMemberFunction.kt"); + doTestWithStdlib(fileName); + } + + @TestMetadata("lambdaInMemberFunctionInLocalClass.kt") + public void testLambdaInMemberFunctionInLocalClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambdaInMemberFunctionInLocalClass.kt"); + doTestWithStdlib(fileName); + } + + @TestMetadata("lambdaInMemberFunctionInNestedClass.kt") + public void testLambdaInMemberFunctionInNestedClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambdaInMemberFunctionInNestedClass.kt"); + doTestWithStdlib(fileName); + } + + @TestMetadata("lambdaInObjectDeclaration.kt") + public void testLambdaInObjectDeclaration() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambdaInObjectDeclaration.kt"); + doTestWithStdlib(fileName); + } + + @TestMetadata("lambdaInObjectExpression.kt") + public void testLambdaInObjectExpression() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambdaInObjectExpression.kt"); + doTestWithStdlib(fileName); + } + + @TestMetadata("lambdaInObjectLiteralSuperCall.kt") + public void testLambdaInObjectLiteralSuperCall() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambdaInObjectLiteralSuperCall.kt"); + doTestWithStdlib(fileName); + } + + @TestMetadata("lambdaInPackage.kt") + public void testLambdaInPackage() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambdaInPackage.kt"); + doTestWithStdlib(fileName); + } + + @TestMetadata("lambdaInPropertyGetter.kt") + public void testLambdaInPropertyGetter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambdaInPropertyGetter.kt"); + doTestWithStdlib(fileName); + } + + @TestMetadata("lambdaInPropertySetter.kt") + public void testLambdaInPropertySetter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambdaInPropertySetter.kt"); + doTestWithStdlib(fileName); + } + @TestMetadata("localClassInTopLevelFunction.kt") public void testLocalClassInTopLevelFunction() throws Exception { String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/localClassInTopLevelFunction.kt"); doTestWithStdlib(fileName); } - @TestMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/insideLambda") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InsideLambda extends AbstractBlackBoxCodegenTest { - public void testAllFilesPresentInInsideLambda() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/insideLambda"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("classInLambda.kt") - public void testClassInLambda() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/insideLambda/classInLambda.kt"); - doTestWithStdlib(fileName); - } - - @TestMetadata("objectInLambda.kt") - public void testObjectInLambda() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/insideLambda/objectInLambda.kt"); - doTestWithStdlib(fileName); - } - } - - @TestMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambda") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Lambda extends AbstractBlackBoxCodegenTest { - public void testAllFilesPresentInLambda() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambda"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("kt6691_lambdaInSamConstructor.kt") - public void testKt6691_lambdaInSamConstructor() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambda/kt6691_lambdaInSamConstructor.kt"); - doTestWithStdlib(fileName); - } - - @TestMetadata("lambdaInConstructor.kt") - public void testLambdaInConstructor() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambda/lambdaInConstructor.kt"); - doTestWithStdlib(fileName); - } - - @TestMetadata("lambdaInFunction.kt") - public void testLambdaInFunction() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambda/lambdaInFunction.kt"); - doTestWithStdlib(fileName); - } - - @TestMetadata("lambdaInLambda.kt") - public void testLambdaInLambda() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambda/lambdaInLambda.kt"); - doTestWithStdlib(fileName); - } - - @TestMetadata("lambdaInLocalClassConstructor.kt") - public void testLambdaInLocalClassConstructor() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambda/lambdaInLocalClassConstructor.kt"); - doTestWithStdlib(fileName); - } - - @TestMetadata("lambdaInLocalClassSuperCall.kt") - public void testLambdaInLocalClassSuperCall() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambda/lambdaInLocalClassSuperCall.kt"); - doTestWithStdlib(fileName); - } - - @TestMetadata("lambdaInLocalFunction.kt") - public void testLambdaInLocalFunction() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambda/lambdaInLocalFunction.kt"); - doTestWithStdlib(fileName); - } - - @TestMetadata("lambdaInMemberFunction.kt") - public void testLambdaInMemberFunction() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambda/lambdaInMemberFunction.kt"); - doTestWithStdlib(fileName); - } - - @TestMetadata("lambdaInMemberFunctionInLocalClass.kt") - public void testLambdaInMemberFunctionInLocalClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambda/lambdaInMemberFunctionInLocalClass.kt"); - doTestWithStdlib(fileName); - } - - @TestMetadata("lambdaInMemberFunctionInNestedClass.kt") - public void testLambdaInMemberFunctionInNestedClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambda/lambdaInMemberFunctionInNestedClass.kt"); - doTestWithStdlib(fileName); - } - - @TestMetadata("lambdaInObjectExpression.kt") - public void testLambdaInObjectExpression() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambda/lambdaInObjectExpression.kt"); - doTestWithStdlib(fileName); - } - - @TestMetadata("lambdaInObjectLiteralSuperCall.kt") - public void testLambdaInObjectLiteralSuperCall() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambda/lambdaInObjectLiteralSuperCall.kt"); - doTestWithStdlib(fileName); - } - - @TestMetadata("lambdaInPackage.kt") - public void testLambdaInPackage() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambda/lambdaInPackage.kt"); - doTestWithStdlib(fileName); - } - - @TestMetadata("lambdaInPropertyGetter.kt") - public void testLambdaInPropertyGetter() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambda/lambdaInPropertyGetter.kt"); - doTestWithStdlib(fileName); - } - - @TestMetadata("lambdaInPropertySetter.kt") - public void testLambdaInPropertySetter() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambda/lambdaInPropertySetter.kt"); - doTestWithStdlib(fileName); - } + @TestMetadata("objectInLambda.kt") + public void testObjectInLambda() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/enclosing/objectInLambda.kt"); + doTestWithStdlib(fileName); } }