From 4f66d5bb1ce47ce48918acaf5c8f6ad44af60dcb Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Mon, 24 Apr 2023 23:09:35 +0200 Subject: [PATCH] JVM: minor, change logic of anyAnnotationDisablesIndyLambdaGeneration.kt Do not check that non-indy-generated lambdas inherit from Lambda, because when we enable indy lambdas by default, we're also changing the behavior of non-indy lambdas so that they won't have the Lambda superclass anymore (see KT-45375). Since this test was added to check that any annotation disables indy lambda generation, just leave those lambdas and rely on the CHECK_BYTECODE_TEXT directive to verify that there are no LambdaMetafactory in the bytecode text. --- .../lambdas/anyAnnotationDisablesIndyLambdaGeneration.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/testData/codegen/box/invokedynamic/lambdas/anyAnnotationDisablesIndyLambdaGeneration.kt b/compiler/testData/codegen/box/invokedynamic/lambdas/anyAnnotationDisablesIndyLambdaGeneration.kt index 8d1bb096e03..70ceed16670 100644 --- a/compiler/testData/codegen/box/invokedynamic/lambdas/anyAnnotationDisablesIndyLambdaGeneration.kt +++ b/compiler/testData/codegen/box/invokedynamic/lambdas/anyAnnotationDisablesIndyLambdaGeneration.kt @@ -14,9 +14,9 @@ import kotlin.jvm.internal.Lambda public annotation class SomeAnnotation fun box(): String { - assert((@SomeAnnotation {}) is Lambda<*>) - assert((@SomeAnnotation fun () {}) is Lambda<*>) - assert((@SomeAnnotation fun Any.() {}) is Lambda<*>) + val a = @SomeAnnotation {} + val b = @SomeAnnotation fun () {} + val c = @SomeAnnotation fun Any.() {} return "OK" }