[PSI2FIR] split AbstractRawFirBuilderLazyBodiesTestCase on ast and stub versions

This commit explicitly splits raw fir builder in lazy mode on
AST and stubs.
By default, in tests we have an AST tree loaded, so all our
`disallowTreeLoading` is useless in unit tests mode

^KT-64646 Fixed
^KT-64898
^KT-64899
^KT-64900
^KT-64901
This commit is contained in:
Dmitrii Gridin
2024-01-11 16:17:17 +01:00
committed by Space Team
parent 459a8368a6
commit 2c0cf9cad8
20 changed files with 900 additions and 18 deletions
@@ -1,3 +1,4 @@
// IGNORE_TREE_ACCESS: KT-64898
import kotlin.reflect.KProperty
annotation class Ann
@@ -0,0 +1,7 @@
FILE: classLevelDestructuringWithAnnotation.kt
public final? class Foo : R|kotlin/Any| {
public? constructor(): R|util/Foo| {
LAZY_super<R|kotlin/Any|>
}
}
@@ -1,3 +1,4 @@
// IGNORE_TREE_ACCESS: KT-64898
@Anno("Derived $x")
data class Derived @Anno("Derived constructor $x") constructor(
@Anno("b $x")
@@ -1,3 +1,4 @@
// IGNORE_TREE_ACCESS: KT-64898
import kotlin.properties.ReadWriteProperty
import kotlin.reflect.KProperty
@@ -1,3 +1,4 @@
// IGNORE_TREE_ACCESS: KT-64898
@Anno("x annotation $x")
val x: Int by lazy { 1 + 2 }
@@ -1,3 +1,4 @@
// IGNORE_TREE_ACCESS: KT-64898
import kotlin.reflect.KProperty
fun String.getValue(x: Any?, y: KProperty<*>) = ""
@@ -0,0 +1,7 @@
FILE: invalidDestructing.kt
public final? class A : R|kotlin/Any| {
public? constructor(): R|A| {
LAZY_super<R|kotlin/Any|>
}
}
@@ -1,3 +1,4 @@
// IGNORE_TREE_ACCESS: KT-64899
class Builder {
var version: String = ""
@@ -1,3 +1,4 @@
// IGNORE_TREE_ACCESS: KT-64899
package util
@DestrAnno("destr 1 $prop")
@@ -1,3 +1,4 @@
// IGNORE_TREE_ACCESS: KT-64899
package util
if (true) {
@@ -1,3 +1,4 @@
// IGNORE_TREE_ACCESS: KT-64899
package util
if (true) {
@@ -0,0 +1 @@
FILE: topLevelDestructuringWithAnnotation.kt
@@ -1,3 +1,4 @@
// IGNORE_TREE_ACCESS: KT-64898
private val nonLocalProperty: List<XXX> by lazy {
val localProperty = mutableListOf<KtLightField>()
localProperty