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.
This commit is contained in:
committed by
Space Team
parent
4d7506bae3
commit
4f66d5bb1c
Vendored
+3
-3
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user