4ac6f01d31
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.
12 lines
328 B
Kotlin
Vendored
12 lines
328 B
Kotlin
Vendored
// !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"}
|
|
)
|
|
}
|
|
|
|
fun box() = if (One().a1[0].fy == "text") "OK" else "fail" |