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:
@@ -0,0 +1,80 @@
|
||||
// DeepInnerLocalChainKt.class
|
||||
// ------------------------------------------
|
||||
package {
|
||||
|
||||
// signature: test()V
|
||||
public final fun test(): kotlin/Unit
|
||||
}
|
||||
// DeepInnerLocalChainKt$test$Local.class
|
||||
// ------------------------------------------
|
||||
local final class .DeepInnerLocalChainKt$test$Local : kotlin/Any {
|
||||
|
||||
// signature: <init>()V
|
||||
public constructor()
|
||||
|
||||
// nested class: Inner
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// DeepInnerLocalChainKt$test$Local$Inner.class
|
||||
// ------------------------------------------
|
||||
local final inner class .DeepInnerLocalChainKt$test$Local.Inner : kotlin/Any {
|
||||
|
||||
// signature: <init>(LDeepInnerLocalChainKt$test$Local;)V
|
||||
public constructor()
|
||||
|
||||
// field: prop:LDeepInnerLocalChainKt$test$Local$Inner$prop$1;
|
||||
// getter: getProp()LDeepInnerLocalChainKt$test$Local$Inner$prop$1;
|
||||
public final val prop: .DeepInnerLocalChainKt$test$Local$Inner$prop$1
|
||||
public final get
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// DeepInnerLocalChainKt$test$Local$Inner$prop$1.class
|
||||
// ------------------------------------------
|
||||
local final class .DeepInnerLocalChainKt$test$Local$Inner$prop$1 : kotlin/Any {
|
||||
|
||||
// signature: foo()V
|
||||
public final fun foo(): kotlin/Unit
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// DeepInnerLocalChainKt$test$Local$Inner$prop$1$foo$bar$DeepLocal.class
|
||||
// ------------------------------------------
|
||||
local final class .DeepInnerLocalChainKt$test$Local$Inner$prop$1$foo$bar$DeepLocal : kotlin/Any {
|
||||
|
||||
// signature: <init>(LDeepInnerLocalChainKt$test$Local;)V
|
||||
public constructor()
|
||||
|
||||
// nested class: Deepest
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// DeepInnerLocalChainKt$test$Local$Inner$prop$1$foo$bar$DeepLocal$Deepest.class
|
||||
// ------------------------------------------
|
||||
local final inner class .DeepInnerLocalChainKt$test$Local$Inner$prop$1$foo$bar$DeepLocal.Deepest : kotlin/Any {
|
||||
|
||||
// signature: <init>(LDeepInnerLocalChainKt$test$Local$Inner$prop$1$foo$bar$DeepLocal;)V
|
||||
public constructor()
|
||||
|
||||
// signature: deep()LDeepInnerLocalChainKt$test$Local$Inner$prop$1$foo$bar$DeepLocal;
|
||||
public final fun deep(): .DeepInnerLocalChainKt$test$Local$Inner$prop$1$foo$bar$DeepLocal
|
||||
|
||||
// signature: deepest()LDeepInnerLocalChainKt$test$Local$Inner$prop$1$foo$bar$DeepLocal$Deepest;
|
||||
public final fun deepest(): .DeepInnerLocalChainKt$test$Local$Inner$prop$1$foo$bar$DeepLocal.Deepest?
|
||||
|
||||
// signature: inner()LDeepInnerLocalChainKt$test$Local$Inner;
|
||||
public final fun inner(): .DeepInnerLocalChainKt$test$Local.Inner
|
||||
|
||||
// signature: local()LDeepInnerLocalChainKt$test$Local;
|
||||
public final fun local(): .DeepInnerLocalChainKt$test$Local
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
package <root> {
|
||||
DeepInnerLocalChainKt
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user