Add ReplaceWithSupertypeAnonymousTypeTransformer to light analysis tests

To make these tests behave closer to kapt, since kapt is the primary use
case for the light analysis mode.

AbstractLightAnalysisModeTest compares the text dump of bytecode
obtained with full analysis and light analysis, removing things like
anonymous/synthetic entities. In the light analysis mode anonymous
objects in supertypes are always approximated, and in the full analysis
mode they are always present as is in signatures. So we're transforming
the text dump in the same way, by approximating anonymous objects in
signatures (more precisely, in return types of methods and fields) to
the supertype.
This commit is contained in:
Alexander Udalov
2023-06-09 00:57:15 +02:00
parent c5f44486a9
commit 4ac6f01d31
6 changed files with 77 additions and 14 deletions
@@ -1,6 +1,10 @@
// WITH_STDLIB
// 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,5 +1,8 @@
// 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 {
+4
View File
@@ -1,4 +1,8 @@
// !LANGUAGE: -PrivateInFileEffectiveVisibility
// In light analysis mode, anonymous object type is approximated to the supertype, so `fy` is unresolved.
// IGNORE_LIGHT_ANALYSIS
private class One {
val a1 = arrayOf(
object { val fy = "text"}