Use JVM IR backend in light analysis mode tests
Add some more filters on private/synthetic stuff (which doesn't matter in practice) to make full and light analysis mode dumps as similar as possible, so that all existing tests will pass for JVM IR. Unmute some tests which were failing with the old JVM backend. Tests on repeatable annotations are muted because in full analysis, annotations are wrapped into the container (e.g. `@A(1) @A(2)` -> `@A$Container(A(1), A(2))`), but they are no in the light analysis mode. So there's always going to be a difference for these tests between full and light analysis, unless we're going to change behavior of kapt, which would be a kind of a breaking change. #KT-58497 Fixed
This commit is contained in:
@@ -7,6 +7,10 @@
|
||||
// java.lang.NoSuchMethodError: java.lang.Class.getAnnotationsByType
|
||||
// IGNORE_BACKEND: ANDROID
|
||||
|
||||
// In light analysis mode, repeated annotations are not wrapped into the container. This is by design, so that in kapt stubs repeated
|
||||
// annotations will be visible unwrapped.
|
||||
// IGNORE_LIGHT_ANALYSIS
|
||||
|
||||
// FILE: box.kt
|
||||
|
||||
import test.A
|
||||
|
||||
+4
@@ -9,6 +9,10 @@
|
||||
// java.lang.NoSuchMethodError: java.lang.Class.getAnnotationsByType
|
||||
// IGNORE_BACKEND: ANDROID
|
||||
|
||||
// In light analysis mode, repeated annotations are not wrapped into the container. This is by design, so that in kapt stubs repeated
|
||||
// annotations will be visible unwrapped.
|
||||
// IGNORE_LIGHT_ANALYSIS
|
||||
|
||||
@JvmRepeatable(As::class)
|
||||
annotation class A(val value: String)
|
||||
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
// java.lang.NoSuchMethodError: java.lang.Class.getAnnotationsByType
|
||||
// IGNORE_BACKEND: ANDROID
|
||||
|
||||
// In light analysis mode, repeated annotations are not wrapped into the container. This is by design, so that in kapt stubs repeated
|
||||
// annotations will be visible unwrapped.
|
||||
// IGNORE_LIGHT_ANALYSIS
|
||||
|
||||
// FILE: box.kt
|
||||
|
||||
@Repeatable
|
||||
|
||||
Vendored
+4
@@ -9,6 +9,10 @@
|
||||
// java.lang.NoSuchMethodError: java.lang.Class.getAnnotationsByType
|
||||
// IGNORE_BACKEND: ANDROID
|
||||
|
||||
// In light analysis mode, repeated annotations are not wrapped into the container. This is by design, so that in kapt stubs repeated
|
||||
// annotations will be visible unwrapped.
|
||||
// IGNORE_LIGHT_ANALYSIS
|
||||
|
||||
@Repeatable
|
||||
@JvmRepeatable(As::class)
|
||||
annotation class A(val value: String)
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
// IGNORE_BACKEND: JVM
|
||||
|
||||
// IGNORE_LIGHT_ANALYSIS
|
||||
// ^ FUNCTION_EXPECTED: Expression 's' of type 'Any' cannot be invoked as a function. The function 'invoke()' is not found
|
||||
|
||||
object A {
|
||||
private val s = object {
|
||||
inline operator fun invoke(): String = "OK"
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
// WITH_COROUTINES
|
||||
// SKIP_MANGLE_VERIFICATION
|
||||
|
||||
// Light analysis mode test is muted because of some bug related to the old JVM backend. To be unmuted once the test is migrated to JVM IR.
|
||||
// IGNORE_LIGHT_ANALYSIS
|
||||
|
||||
import helpers.*
|
||||
import kotlin.coroutines.*
|
||||
import kotlin.coroutines.intrinsics.*
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
// ISSUE: KT-35707
|
||||
|
||||
// Light analysis mode test is muted because of some bug related to the old JVM backend. To be unmuted once the test is migrated to JVM IR.
|
||||
// IGNORE_LIGHT_ANALYSIS
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
interface PropertyDelegate {
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// ISSUE: KT-59140
|
||||
|
||||
// IGNORE_LIGHT_ANALYSIS
|
||||
// ^ MISSING_DEPENDENCY_SUPERCLASS: Cannot access 'pkg.CommonFoo' which is a supertype of 'pkg.Foo'. Check your module classpath for missing or conflicting dependencies
|
||||
|
||||
// FILE: pkg/Foo.java
|
||||
|
||||
package pkg;
|
||||
|
||||
+5
@@ -3,6 +3,11 @@
|
||||
// JVM_TARGET: 1.8
|
||||
// FULL_JDK
|
||||
// WITH_REFLECT
|
||||
|
||||
// In light analysis mode, repeated annotations are not wrapped into the container. This is by design, so that in kapt stubs repeated
|
||||
// annotations will be visible unwrapped.
|
||||
// IGNORE_LIGHT_ANALYSIS
|
||||
|
||||
// FILE: box.kt
|
||||
|
||||
import kotlin.reflect.full.findAnnotation
|
||||
|
||||
Vendored
+4
@@ -7,6 +7,10 @@
|
||||
// Android doesn't have @Repeatable before API level 24, so findAnnotations can't unpack repeatable annotations.
|
||||
// IGNORE_BACKEND: ANDROID
|
||||
|
||||
// In light analysis mode, repeated annotations are not wrapped into the container. This is by design, so that in kapt stubs repeated
|
||||
// annotations will be visible unwrapped.
|
||||
// IGNORE_LIGHT_ANALYSIS
|
||||
|
||||
import kotlin.reflect.full.findAnnotation
|
||||
import kotlin.reflect.full.findAnnotations
|
||||
import kotlin.reflect.full.hasAnnotation
|
||||
|
||||
+4
@@ -4,6 +4,10 @@
|
||||
// FULL_JDK
|
||||
// WITH_REFLECT
|
||||
|
||||
// In light analysis mode, repeated annotations are not wrapped into the container. This is by design, so that in kapt stubs repeated
|
||||
// annotations will be visible unwrapped.
|
||||
// IGNORE_LIGHT_ANALYSIS
|
||||
|
||||
import kotlin.annotation.AnnotationTarget.*
|
||||
import kotlin.reflect.KAnnotatedElement
|
||||
import kotlin.reflect.full.findAnnotation
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
// Android doesn't have @Repeatable before API level 24, so findAnnotations can't unpack repeatable annotations.
|
||||
// IGNORE_BACKEND: ANDROID
|
||||
|
||||
// In light analysis mode, repeated annotations are not wrapped into the container. This is by design, so that in kapt stubs repeated
|
||||
// annotations will be visible unwrapped.
|
||||
// IGNORE_LIGHT_ANALYSIS
|
||||
|
||||
// FILE: A.kt
|
||||
@java.lang.annotation.Repeatable(A.Container::class)
|
||||
annotation class A(val value: String) {
|
||||
|
||||
Reference in New Issue
Block a user