Remove LocalClassProtoTestGenerated, replace with kotlinp tests

This test uses a hacky mode of the compiler which is not worth it to
support further (especially in K2), `USE_SINGLE_MODULE`, where
everything is compiled in one module. The purpose of the test is just to
check that metadata for local/anonymous classes is written correctly.
So we can replace it with the tests on kotlinp, which uses
kotlinx-metadata-jvm and dumps all loaded metadata to text.

This replacement is not perfect, in particular because it won't check
that the reflection machinery is able to load this metadata, and because
it won't check that annotations are loaded correctly from the bytecode.
But IMHO it's good enough, there are box tests on reflection on local
classes (e.g. `reflection/annotations/localClassLiteral.kt`), so this
way is better than having to support the weird compiler mode for just
one test.
This commit is contained in:
Alexander Udalov
2022-08-26 13:30:56 +02:00
parent 7bf6d64cfb
commit abaffeddab
24 changed files with 178 additions and 263 deletions
@@ -0,0 +1,20 @@
fun test() {
class Local {
inner class Inner {
val prop = object {
fun foo() {
fun bar() {
class DeepLocal {
inner class Deepest {
fun local(): Local = Local()
fun inner(): Inner = Inner()
fun deep(): DeepLocal = DeepLocal()
fun deepest(): Deepest? = Deepest()
}
}
}
}
}
}
}
}