[Analysis API] support Java compilation in tests

Previously we just skipped Java sources.
The order of classes in light classes test data is changed due to
differences in implementations of `compileLibraryToJar` and `runJvmCompiler`

^KT-62892
This commit is contained in:
Dmitrii Gridin
2024-01-03 14:23:48 +01:00
committed by Space Team
parent a9f85d75f4
commit 6c7d1babf0
14 changed files with 448 additions and 322 deletions
@@ -9,6 +9,7 @@ import org.jetbrains.kotlin.cli.common.arguments.CommonCompilerArguments
import org.jetbrains.kotlin.cli.common.arguments.K2JSCompilerArguments import org.jetbrains.kotlin.cli.common.arguments.K2JSCompilerArguments
import org.jetbrains.kotlin.cli.common.arguments.K2JVMCompilerArguments import org.jetbrains.kotlin.cli.common.arguments.K2JVMCompilerArguments
import org.jetbrains.kotlin.cli.common.arguments.cliArgument import org.jetbrains.kotlin.cli.common.arguments.cliArgument
import org.jetbrains.kotlin.cli.jvm.config.jvmClasspathRoots
import org.jetbrains.kotlin.config.JvmTarget import org.jetbrains.kotlin.config.JvmTarget
import org.jetbrains.kotlin.platform.isJs import org.jetbrains.kotlin.platform.isJs
import org.jetbrains.kotlin.platform.jvm.isJvm import org.jetbrains.kotlin.platform.jvm.isJvm
@@ -16,6 +17,7 @@ import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirective
import org.jetbrains.kotlin.test.directives.LanguageSettingsDirectives import org.jetbrains.kotlin.test.directives.LanguageSettingsDirectives
import org.jetbrains.kotlin.test.model.TestModule import org.jetbrains.kotlin.test.model.TestModule
import org.jetbrains.kotlin.test.services.TestServices import org.jetbrains.kotlin.test.services.TestServices
import org.jetbrains.kotlin.test.services.compilerConfigurationProvider
import org.jetbrains.kotlin.test.services.sourceFileProvider import org.jetbrains.kotlin.test.services.sourceFileProvider
import org.jetbrains.kotlin.test.services.standardLibrariesPathProvider import org.jetbrains.kotlin.test.services.standardLibrariesPathProvider
import org.jetbrains.kotlin.test.util.KtTestUtil import org.jetbrains.kotlin.test.util.KtTestUtil
@@ -39,6 +41,7 @@ abstract class CliTestModuleCompiler : TestModuleCompiler() {
buildCompilerOptions(module, testServices), buildCompilerOptions(module, testServices),
compilationErrorExpected = Directives.COMPILATION_ERRORS in module.directives, compilationErrorExpected = Directives.COMPILATION_ERRORS in module.directives,
libraryName = module.name, libraryName = module.name,
extraClasspath = buildExtraClasspath(module, testServices),
) )
override fun compileTestModuleToLibrarySources(module: TestModule, testServices: TestServices): Path { override fun compileTestModuleToLibrarySources(module: TestModule, testServices: TestServices): Path {
@@ -55,6 +58,12 @@ abstract class CliTestModuleCompiler : TestModuleCompiler() {
return librarySourcesPath return librarySourcesPath
} }
private fun buildExtraClasspath(module: TestModule, testServices: TestServices): List<String> = buildList {
addAll(buildPlatformExtraClasspath(module, testServices))
}
protected open fun buildPlatformExtraClasspath(module: TestModule, testServices: TestServices): List<String> = emptyList()
private fun buildCompilerOptions(module: TestModule, testServices: TestServices): List<String> = buildList { private fun buildCompilerOptions(module: TestModule, testServices: TestServices): List<String> = buildList {
addAll(buildCommonCompilerOptions(module)) addAll(buildCommonCompilerOptions(module))
addAll(buildPlatformCompilerOptions(module, testServices)) addAll(buildPlatformCompilerOptions(module, testServices))
@@ -101,6 +110,13 @@ class JvmJarTestModuleCompiler : CliTestModuleCompiler() {
addAll(listOf(K2JVMCompilerArguments::jdkHome.cliArgument, jdkHome.toString())) addAll(listOf(K2JVMCompilerArguments::jdkHome.cliArgument, jdkHome.toString()))
} }
} }
override fun buildPlatformExtraClasspath(module: TestModule, testServices: TestServices): List<String> = buildList {
val compilerConfiguration = testServices.compilerConfigurationProvider.getCompilerConfiguration(module)
for (file in compilerConfiguration.jvmClasspathRoots) {
add(file.absolutePath)
}
}
} }
class JsKlibTestModuleCompiler : CliTestModuleCompiler() { class JsKlibTestModuleCompiler : CliTestModuleCompiler() {
@@ -7,10 +7,10 @@ package org.jetbrains.kotlin.analysis.test.framework.services.libraries
import org.jetbrains.kotlin.analysis.test.framework.utils.SkipTestException import org.jetbrains.kotlin.analysis.test.framework.utils.SkipTestException
import org.jetbrains.kotlin.cli.common.arguments.K2JSCompilerArguments import org.jetbrains.kotlin.cli.common.arguments.K2JSCompilerArguments
import org.jetbrains.kotlin.cli.common.arguments.K2JVMCompilerArguments
import org.jetbrains.kotlin.cli.common.arguments.cliArgument import org.jetbrains.kotlin.cli.common.arguments.cliArgument
import org.jetbrains.kotlin.config.LanguageFeature import org.jetbrains.kotlin.config.LanguageFeature
import org.jetbrains.kotlin.test.MockLibraryUtil import org.jetbrains.kotlin.test.MockLibraryUtil
import org.jetbrains.kotlin.test.services.JUnit5Assertions
import java.nio.file.Path import java.nio.file.Path
import kotlin.io.path.* import kotlin.io.path.*
@@ -21,9 +21,10 @@ internal object CompilerExecutor {
options: List<String>, options: List<String>,
compilationErrorExpected: Boolean, compilationErrorExpected: Boolean,
libraryName: String, libraryName: String,
extraClasspath: List<String>,
): Path { ): Path {
val library = try { val library = try {
compile(compilerKind, sourcesPath, options, libraryName) compile(compilerKind, sourcesPath, options, libraryName, extraClasspath)
} catch (e: Throwable) { } catch (e: Throwable) {
if (!compilationErrorExpected) { if (!compilationErrorExpected) {
throw IllegalStateException("Unexpected compilation error while compiling library", e) throw IllegalStateException("Unexpected compilation error while compiling library", e)
@@ -40,7 +41,13 @@ internal object CompilerExecutor {
return library return library
} }
private fun compile(compilerKind: CompilerKind, sourcesPath: Path, options: List<String>, libraryName: String): Path { private fun compile(
compilerKind: CompilerKind,
sourcesPath: Path,
options: List<String>,
libraryName: String,
extraClasspath: List<String>,
): Path {
val sourceFiles = sourcesPath.toFile().walkBottomUp() val sourceFiles = sourcesPath.toFile().walkBottomUp()
val library = when (compilerKind) { val library = when (compilerKind) {
CompilerKind.JVM -> sourcesPath / "$libraryName.jar" CompilerKind.JVM -> sourcesPath / "$libraryName.jar"
@@ -49,13 +56,20 @@ internal object CompilerExecutor {
when (compilerKind) { when (compilerKind) {
CompilerKind.JVM -> { CompilerKind.JVM -> {
val commands = buildList { val extraOptions = buildList {
sourceFiles.mapTo(this) { it.absolutePath }
addAll(options) addAll(options)
add(K2JVMCompilerArguments::destination.cliArgument); add(library.absolutePathString())
add("-XXLanguage:-${LanguageFeature.SkipStandaloneScriptsInSourceRoots.name}") add("-XXLanguage:-${LanguageFeature.SkipStandaloneScriptsInSourceRoots.name}")
} }
MockLibraryUtil.runJvmCompiler(commands)
MockLibraryUtil.compileLibraryToJar(
sourcesPath = sourcesPath.absolutePathString(),
contentDir = sourcesPath.toFile(),
jarName = libraryName,
extraOptions = extraOptions,
assertions = JUnit5Assertions,
useJava11 = true,
extraClasspath = extraClasspath,
)
} }
CompilerKind.JS -> { CompilerKind.JS -> {
val commands = buildList { val commands = buildList {
@@ -1,5 +1,5 @@
/* /*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors. * Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
@@ -12,6 +12,7 @@ import org.jetbrains.kotlin.test.services.TestServices
import org.jetbrains.kotlin.test.services.sourceFileProvider import org.jetbrains.kotlin.test.services.sourceFileProvider
import org.jetbrains.kotlin.test.util.KtTestUtil import org.jetbrains.kotlin.test.util.KtTestUtil
import java.nio.file.Path import java.nio.file.Path
import kotlin.io.path.createDirectories
import kotlin.io.path.createFile import kotlin.io.path.createFile
import kotlin.io.path.div import kotlin.io.path.div
import kotlin.io.path.writeText import kotlin.io.path.writeText
@@ -21,7 +22,10 @@ abstract class TestModuleCompiler : TestService {
val tmpDir = KtTestUtil.tmpDir("testSourcesToCompile").toPath() val tmpDir = KtTestUtil.tmpDir("testSourcesToCompile").toPath()
for (testFile in module.files) { for (testFile in module.files) {
val text = testServices.sourceFileProvider.getContentOfSourceFile(testFile) val text = testServices.sourceFileProvider.getContentOfSourceFile(testFile)
val tmpSourceFile = (tmpDir / testFile.name).createFile() val filePath = tmpDir / testFile.relativePath
filePath.parent.createDirectories()
val tmpSourceFile = filePath.createFile()
tmpSourceFile.writeText(text) tmpSourceFile.writeText(text)
} }
return compile(tmpDir, module, testServices) return compile(tmpDir, module, testServices)
@@ -1,5 +1,5 @@
/* /*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors. * Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
@@ -15,6 +15,7 @@ import org.jetbrains.kotlin.analysis.low.level.api.fir.test.base.AnalysisApiFirT
import org.jetbrains.kotlin.analysis.test.framework.project.structure.KtLibraryBinaryModuleFactory import org.jetbrains.kotlin.analysis.test.framework.project.structure.KtLibraryBinaryModuleFactory
import org.jetbrains.kotlin.analysis.test.framework.project.structure.KtModuleFactory import org.jetbrains.kotlin.analysis.test.framework.project.structure.KtModuleFactory
import org.jetbrains.kotlin.analysis.test.framework.project.structure.TestModuleStructureFactory import org.jetbrains.kotlin.analysis.test.framework.project.structure.TestModuleStructureFactory
import org.jetbrains.kotlin.analysis.test.framework.services.configuration.AnalysisApiJvmEnvironmentConfigurator
import org.jetbrains.kotlin.analysis.test.framework.services.libraries.* import org.jetbrains.kotlin.analysis.test.framework.services.libraries.*
import org.jetbrains.kotlin.analysis.test.framework.test.configurators.AnalysisApiTestConfigurator import org.jetbrains.kotlin.analysis.test.framework.test.configurators.AnalysisApiTestConfigurator
import org.jetbrains.kotlin.analysis.test.framework.test.configurators.AnalysisApiTestServiceRegistrar import org.jetbrains.kotlin.analysis.test.framework.test.configurators.AnalysisApiTestServiceRegistrar
@@ -38,6 +39,7 @@ object AnalysisApiFirLibraryBinaryTestConfigurator : AnalysisApiTestConfigurator
builder.apply { builder.apply {
useAdditionalService<TestModuleCompiler> { DispatchingTestModuleCompiler() } useAdditionalService<TestModuleCompiler> { DispatchingTestModuleCompiler() }
useAdditionalService<TestModuleDecompiler> { TestModuleDecompilerJar() } useAdditionalService<TestModuleDecompiler> { TestModuleDecompilerJar() }
useConfigurators(::AnalysisApiJvmEnvironmentConfigurator)
} }
} }
@@ -15,23 +15,6 @@ FinalClass.class:
ClsClassImpl: Object (java.lang.Object) ClsClassImpl: Object (java.lang.Object)
] ]
AbstractClass.class:
KtClass:
line: 6
name: AbstractClass
qualifier: cba.AbstractClass
light: KtLightClassForDecompiledDeclaration
name: AbstractClass
qualifier: cba.AbstractClass
superTypes: [
PsiType:Object
]
superClass: ClsClassImpl: Object (java.lang.Object)
interfaces: []
supers: [
ClsClassImpl: Object (java.lang.Object)
]
ChildOfOpen.class: ChildOfOpen.class:
KtClass: KtClass:
line: 6 line: 6
@@ -49,6 +32,23 @@ ChildOfOpen.class:
KtLightClassForDecompiledDeclaration: OpenClassFromAbstractClass (cba.OpenClassFromAbstractClass) KtLightClassForDecompiledDeclaration: OpenClassFromAbstractClass (cba.OpenClassFromAbstractClass)
] ]
AbstractClass.class:
KtClass:
line: 6
name: AbstractClass
qualifier: cba.AbstractClass
light: KtLightClassForDecompiledDeclaration
name: AbstractClass
qualifier: cba.AbstractClass
superTypes: [
PsiType:Object
]
superClass: ClsClassImpl: Object (java.lang.Object)
interfaces: []
supers: [
ClsClassImpl: Object (java.lang.Object)
]
OpenClassFromAbstractClass.class: OpenClassFromAbstractClass.class:
KtClass: KtClass:
line: 6 line: 6
@@ -1,20 +1,3 @@
BaseInterface.class:
KtClass:
line: 6
name: BaseInterface
qualifier: one.two.BaseInterface
light: KtLightClassForDecompiledDeclaration
name: BaseInterface
qualifier: one.two.BaseInterface
superTypes: [
PsiType:Object
]
superClass: ClsClassImpl: Object (java.lang.Object)
interfaces: []
supers: [
ClsClassImpl: Object (java.lang.Object)
]
EnumClassWithInterface.class: EnumClassWithInterface.class:
KtClass: KtClass:
line: 6 line: 6
@@ -48,6 +31,23 @@ EnumClassWithInterface.class:
qualifier: one.two.EnumClassWithInterface.NewSecondEntryWithBody qualifier: one.two.EnumClassWithInterface.NewSecondEntryWithBody
light: null light: null
BaseInterface.class:
KtClass:
line: 6
name: BaseInterface
qualifier: one.two.BaseInterface
light: KtLightClassForDecompiledDeclaration
name: BaseInterface
qualifier: one.two.BaseInterface
superTypes: [
PsiType:Object
]
superClass: ClsClassImpl: Object (java.lang.Object)
interfaces: []
supers: [
ClsClassImpl: Object (java.lang.Object)
]
EnumEntries.class: EnumEntries.class:
KtClass: KtClass:
line: 6 line: 6
@@ -1,60 +1,39 @@
OpenBaseClass.class: FinalClassWithComplexInterface.class:
KtClass: KtClass:
line: 6 line: 6
name: OpenBaseClass name: FinalClassWithComplexInterface
qualifier: my.OpenBaseClass qualifier: my.FinalClassWithComplexInterface
light: KtLightClassForDecompiledDeclaration light: KtLightClassForDecompiledDeclaration
name: OpenBaseClass name: FinalClassWithComplexInterface
qualifier: my.OpenBaseClass qualifier: my.FinalClassWithComplexInterface
superTypes: [ superTypes: [
PsiType:Object PsiType:Object
PsiType:ComplexInterface
] ]
superClass: ClsClassImpl: Object (java.lang.Object) superClass: ClsClassImpl: Object (java.lang.Object)
interfaces: [
KtLightClassForDecompiledDeclaration: ComplexInterface (my.ComplexInterface)
]
supers: [
ClsClassImpl: Object (java.lang.Object)
KtLightClassForDecompiledDeclaration: ComplexInterface (my.ComplexInterface)
]
OnlyTransitiveInterface.class:
KtClass:
line: 6
name: OnlyTransitiveInterface
qualifier: my.OnlyTransitiveInterface
light: KtLightClassForDecompiledDeclaration
name: OnlyTransitiveInterface
qualifier: my.OnlyTransitiveInterface
superTypes: [
PsiType:OpenComplexClass
]
superClass: KtLightClassForDecompiledDeclaration: OpenComplexClass (my.OpenComplexClass)
interfaces: [] interfaces: []
supers: [ supers: [
ClsClassImpl: Object (java.lang.Object) KtLightClassForDecompiledDeclaration: OpenComplexClass (my.OpenComplexClass)
]
FinalClassWithBaseInterface.class:
KtClass:
line: 6
name: FinalClassWithBaseInterface
qualifier: my.FinalClassWithBaseInterface
light: KtLightClassForDecompiledDeclaration
name: FinalClassWithBaseInterface
qualifier: my.FinalClassWithBaseInterface
superTypes: [
PsiType:Object
PsiType:BaseInterface1
]
superClass: ClsClassImpl: Object (java.lang.Object)
interfaces: [
KtLightClassForDecompiledDeclaration: BaseInterface1 (my.BaseInterface1)
]
supers: [
ClsClassImpl: Object (java.lang.Object)
KtLightClassForDecompiledDeclaration: BaseInterface1 (my.BaseInterface1)
]
AbstractClassWithBaseInterface.class:
KtClass:
line: 6
name: AbstractClassWithBaseInterface
qualifier: my.AbstractClassWithBaseInterface
light: KtLightClassForDecompiledDeclaration
name: AbstractClassWithBaseInterface
qualifier: my.AbstractClassWithBaseInterface
superTypes: [
PsiType:Object
PsiType:BaseInterface2
]
superClass: ClsClassImpl: Object (java.lang.Object)
interfaces: [
KtLightClassForDecompiledDeclaration: BaseInterface2 (my.BaseInterface2)
]
supers: [
ClsClassImpl: Object (java.lang.Object)
KtLightClassForDecompiledDeclaration: BaseInterface2 (my.BaseInterface2)
] ]
BaseInterface1.class: BaseInterface1.class:
@@ -115,21 +94,111 @@ FinalClassWithSeveralBaseInterfaces.class:
KtLightClassForDecompiledDeclaration: BaseInterface2 (my.BaseInterface2) KtLightClassForDecompiledDeclaration: BaseInterface2 (my.BaseInterface2)
] ]
OnlyTransitiveInterface.class: ComplexInterface.class:
KtClass: KtClass:
line: 6 line: 6
name: OnlyTransitiveInterface name: ComplexInterface
qualifier: my.OnlyTransitiveInterface qualifier: my.ComplexInterface
light: KtLightClassForDecompiledDeclaration light: KtLightClassForDecompiledDeclaration
name: OnlyTransitiveInterface name: ComplexInterface
qualifier: my.OnlyTransitiveInterface qualifier: my.ComplexInterface
superTypes: [ superTypes: [
PsiType:OpenComplexClass PsiType:BaseInterface1
PsiType:BaseInterface2
]
superClass: ClsClassImpl: Object (java.lang.Object)
interfaces: [
KtLightClassForDecompiledDeclaration: BaseInterface1 (my.BaseInterface1)
KtLightClassForDecompiledDeclaration: BaseInterface2 (my.BaseInterface2)
] ]
superClass: KtLightClassForDecompiledDeclaration: OpenComplexClass (my.OpenComplexClass)
interfaces: []
supers: [ supers: [
KtLightClassForDecompiledDeclaration: OpenComplexClass (my.OpenComplexClass) ClsClassImpl: Object (java.lang.Object)
KtLightClassForDecompiledDeclaration: BaseInterface1 (my.BaseInterface1)
KtLightClassForDecompiledDeclaration: BaseInterface2 (my.BaseInterface2)
]
AbstractClassWithBaseInterface.class:
KtClass:
line: 6
name: AbstractClassWithBaseInterface
qualifier: my.AbstractClassWithBaseInterface
light: KtLightClassForDecompiledDeclaration
name: AbstractClassWithBaseInterface
qualifier: my.AbstractClassWithBaseInterface
superTypes: [
PsiType:Object
PsiType:BaseInterface2
]
superClass: ClsClassImpl: Object (java.lang.Object)
interfaces: [
KtLightClassForDecompiledDeclaration: BaseInterface2 (my.BaseInterface2)
]
supers: [
ClsClassImpl: Object (java.lang.Object)
KtLightClassForDecompiledDeclaration: BaseInterface2 (my.BaseInterface2)
]
AbstractClassTransitiveBaseInterface.class:
KtClass:
line: 6
name: AbstractClassTransitiveBaseInterface
qualifier: my.AbstractClassTransitiveBaseInterface
light: KtLightClassForDecompiledDeclaration
name: AbstractClassTransitiveBaseInterface
qualifier: my.AbstractClassTransitiveBaseInterface
superTypes: [
PsiType:AbstractClassWithBaseInterface
PsiType:BaseInterface1
]
superClass: KtLightClassForDecompiledDeclaration: AbstractClassWithBaseInterface (my.AbstractClassWithBaseInterface)
interfaces: [
KtLightClassForDecompiledDeclaration: BaseInterface1 (my.BaseInterface1)
]
supers: [
KtLightClassForDecompiledDeclaration: AbstractClassWithBaseInterface (my.AbstractClassWithBaseInterface)
KtLightClassForDecompiledDeclaration: BaseInterface1 (my.BaseInterface1)
]
FinalClassWithBaseInterface.class:
KtClass:
line: 6
name: FinalClassWithBaseInterface
qualifier: my.FinalClassWithBaseInterface
light: KtLightClassForDecompiledDeclaration
name: FinalClassWithBaseInterface
qualifier: my.FinalClassWithBaseInterface
superTypes: [
PsiType:Object
PsiType:BaseInterface1
]
superClass: ClsClassImpl: Object (java.lang.Object)
interfaces: [
KtLightClassForDecompiledDeclaration: BaseInterface1 (my.BaseInterface1)
]
supers: [
ClsClassImpl: Object (java.lang.Object)
KtLightClassForDecompiledDeclaration: BaseInterface1 (my.BaseInterface1)
]
OpenComplexClass.class:
KtClass:
line: 6
name: OpenComplexClass
qualifier: my.OpenComplexClass
light: KtLightClassForDecompiledDeclaration
name: OpenComplexClass
qualifier: my.OpenComplexClass
superTypes: [
PsiType:AbstractClassTransitiveBaseInterface
PsiType:ComplexInterface
]
superClass: KtLightClassForDecompiledDeclaration: AbstractClassTransitiveBaseInterface (my.AbstractClassTransitiveBaseInterface)
interfaces: [
KtLightClassForDecompiledDeclaration: ComplexInterface (my.ComplexInterface)
]
supers: [
KtLightClassForDecompiledDeclaration: AbstractClassTransitiveBaseInterface (my.AbstractClassTransitiveBaseInterface)
KtLightClassForDecompiledDeclaration: ComplexInterface (my.ComplexInterface)
] ]
AbstractClassWithComplexInterface.class: AbstractClassWithComplexInterface.class:
@@ -177,89 +246,20 @@ FinalClassWithComplexInterfaceAndBaseInterface.class:
KtLightClassForDecompiledDeclaration: BaseInterface1 (my.BaseInterface1) KtLightClassForDecompiledDeclaration: BaseInterface1 (my.BaseInterface1)
] ]
FinalClassWithComplexInterface.class: OpenBaseClass.class:
KtClass: KtClass:
line: 6 line: 6
name: FinalClassWithComplexInterface name: OpenBaseClass
qualifier: my.FinalClassWithComplexInterface qualifier: my.OpenBaseClass
light: KtLightClassForDecompiledDeclaration light: KtLightClassForDecompiledDeclaration
name: FinalClassWithComplexInterface name: OpenBaseClass
qualifier: my.FinalClassWithComplexInterface qualifier: my.OpenBaseClass
superTypes: [ superTypes: [
PsiType:Object PsiType:Object
PsiType:ComplexInterface
] ]
superClass: ClsClassImpl: Object (java.lang.Object) superClass: ClsClassImpl: Object (java.lang.Object)
interfaces: [ interfaces: []
KtLightClassForDecompiledDeclaration: ComplexInterface (my.ComplexInterface)
]
supers: [ supers: [
ClsClassImpl: Object (java.lang.Object) ClsClassImpl: Object (java.lang.Object)
KtLightClassForDecompiledDeclaration: ComplexInterface (my.ComplexInterface)
]
AbstractClassTransitiveBaseInterface.class:
KtClass:
line: 6
name: AbstractClassTransitiveBaseInterface
qualifier: my.AbstractClassTransitiveBaseInterface
light: KtLightClassForDecompiledDeclaration
name: AbstractClassTransitiveBaseInterface
qualifier: my.AbstractClassTransitiveBaseInterface
superTypes: [
PsiType:AbstractClassWithBaseInterface
PsiType:BaseInterface1
]
superClass: KtLightClassForDecompiledDeclaration: AbstractClassWithBaseInterface (my.AbstractClassWithBaseInterface)
interfaces: [
KtLightClassForDecompiledDeclaration: BaseInterface1 (my.BaseInterface1)
]
supers: [
KtLightClassForDecompiledDeclaration: AbstractClassWithBaseInterface (my.AbstractClassWithBaseInterface)
KtLightClassForDecompiledDeclaration: BaseInterface1 (my.BaseInterface1)
]
ComplexInterface.class:
KtClass:
line: 6
name: ComplexInterface
qualifier: my.ComplexInterface
light: KtLightClassForDecompiledDeclaration
name: ComplexInterface
qualifier: my.ComplexInterface
superTypes: [
PsiType:BaseInterface1
PsiType:BaseInterface2
]
superClass: ClsClassImpl: Object (java.lang.Object)
interfaces: [
KtLightClassForDecompiledDeclaration: BaseInterface1 (my.BaseInterface1)
KtLightClassForDecompiledDeclaration: BaseInterface2 (my.BaseInterface2)
]
supers: [
ClsClassImpl: Object (java.lang.Object)
KtLightClassForDecompiledDeclaration: BaseInterface1 (my.BaseInterface1)
KtLightClassForDecompiledDeclaration: BaseInterface2 (my.BaseInterface2)
]
OpenComplexClass.class:
KtClass:
line: 6
name: OpenComplexClass
qualifier: my.OpenComplexClass
light: KtLightClassForDecompiledDeclaration
name: OpenComplexClass
qualifier: my.OpenComplexClass
superTypes: [
PsiType:AbstractClassTransitiveBaseInterface
PsiType:ComplexInterface
]
superClass: KtLightClassForDecompiledDeclaration: AbstractClassTransitiveBaseInterface (my.AbstractClassTransitiveBaseInterface)
interfaces: [
KtLightClassForDecompiledDeclaration: ComplexInterface (my.ComplexInterface)
]
supers: [
KtLightClassForDecompiledDeclaration: AbstractClassTransitiveBaseInterface (my.AbstractClassTransitiveBaseInterface)
KtLightClassForDecompiledDeclaration: ComplexInterface (my.ComplexInterface)
] ]
@@ -15,6 +15,23 @@ SingleInterface.class:
ClsClassImpl: Object (java.lang.Object) ClsClassImpl: Object (java.lang.Object)
] ]
BaseInterface1.class:
KtClass:
line: 6
name: BaseInterface1
qualifier: abc.BaseInterface1
light: KtLightClassForDecompiledDeclaration
name: BaseInterface1
qualifier: abc.BaseInterface1
superTypes: [
PsiType:Object
]
superClass: ClsClassImpl: Object (java.lang.Object)
interfaces: []
supers: [
ClsClassImpl: Object (java.lang.Object)
]
BaseInterface2.class: BaseInterface2.class:
KtClass: KtClass:
line: 6 line: 6
@@ -32,26 +49,6 @@ BaseInterface2.class:
ClsClassImpl: Object (java.lang.Object) ClsClassImpl: Object (java.lang.Object)
] ]
InterfaceWithTransitive.class:
KtClass:
line: 6
name: InterfaceWithTransitive
qualifier: abc.InterfaceWithTransitive
light: KtLightClassForDecompiledDeclaration
name: InterfaceWithTransitive
qualifier: abc.InterfaceWithTransitive
superTypes: [
PsiType:InterfaceWithBase
]
superClass: ClsClassImpl: Object (java.lang.Object)
interfaces: [
KtLightClassForDecompiledDeclaration: InterfaceWithBase (abc.InterfaceWithBase)
]
supers: [
ClsClassImpl: Object (java.lang.Object)
KtLightClassForDecompiledDeclaration: InterfaceWithBase (abc.InterfaceWithBase)
]
InterfaceWithBase.class: InterfaceWithBase.class:
KtClass: KtClass:
line: 6 line: 6
@@ -75,20 +72,23 @@ InterfaceWithBase.class:
KtLightClassForDecompiledDeclaration: BaseInterface2 (abc.BaseInterface2) KtLightClassForDecompiledDeclaration: BaseInterface2 (abc.BaseInterface2)
] ]
BaseInterface1.class: InterfaceWithTransitive.class:
KtClass: KtClass:
line: 6 line: 6
name: BaseInterface1 name: InterfaceWithTransitive
qualifier: abc.BaseInterface1 qualifier: abc.InterfaceWithTransitive
light: KtLightClassForDecompiledDeclaration light: KtLightClassForDecompiledDeclaration
name: BaseInterface1 name: InterfaceWithTransitive
qualifier: abc.BaseInterface1 qualifier: abc.InterfaceWithTransitive
superTypes: [ superTypes: [
PsiType:Object PsiType:InterfaceWithBase
] ]
superClass: ClsClassImpl: Object (java.lang.Object) superClass: ClsClassImpl: Object (java.lang.Object)
interfaces: [] interfaces: [
KtLightClassForDecompiledDeclaration: InterfaceWithBase (abc.InterfaceWithBase)
]
supers: [ supers: [
ClsClassImpl: Object (java.lang.Object) ClsClassImpl: Object (java.lang.Object)
KtLightClassForDecompiledDeclaration: InterfaceWithBase (abc.InterfaceWithBase)
] ]
@@ -1,3 +1,80 @@
ObjectsKt.class:
ObjectWithInterface.class:
KtObjectDeclaration:
line: 6
name: ObjectWithInterface
qualifier: two.ObjectWithInterface
light: KtLightClassForDecompiledDeclaration
name: ObjectWithInterface
qualifier: two.ObjectWithInterface
superTypes: [
PsiType:Object
PsiType:BaseInterface
]
superClass: ClsClassImpl: Object (java.lang.Object)
interfaces: [
KtLightClassForDecompiledDeclaration: BaseInterface (two.BaseInterface)
]
supers: [
ClsClassImpl: Object (java.lang.Object)
KtLightClassForDecompiledDeclaration: BaseInterface (two.BaseInterface)
]
NonBaseClass.class:
KtClass:
line: 6
name: NonBaseClass
qualifier: two.NonBaseClass
light: KtLightClassForDecompiledDeclaration
name: NonBaseClass
qualifier: two.NonBaseClass
superTypes: [
PsiType:BaseClass
]
superClass: KtLightClassForDecompiledDeclaration: BaseClass (two.BaseClass)
interfaces: []
supers: [
KtLightClassForDecompiledDeclaration: BaseClass (two.BaseClass)
]
ObjectWithNonBaseInterface.class:
KtObjectDeclaration:
line: 6
name: ObjectWithNonBaseInterface
qualifier: two.ObjectWithNonBaseInterface
light: KtLightClassForDecompiledDeclaration
name: ObjectWithNonBaseInterface
qualifier: two.ObjectWithNonBaseInterface
superTypes: [
PsiType:Object
PsiType:NonBaseInterface
]
superClass: ClsClassImpl: Object (java.lang.Object)
interfaces: [
KtLightClassForDecompiledDeclaration: NonBaseInterface (two.NonBaseInterface)
]
supers: [
ClsClassImpl: Object (java.lang.Object)
KtLightClassForDecompiledDeclaration: NonBaseInterface (two.NonBaseInterface)
]
Object.class:
KtObjectDeclaration:
line: 6
name: Object
qualifier: two.Object
light: KtLightClassForDecompiledDeclaration
name: Object
qualifier: two.Object
superTypes: [
PsiType:Object
]
superClass: ClsClassImpl: Object (java.lang.Object)
interfaces: []
supers: [
ClsClassImpl: Object (java.lang.Object)
]
ObjectWithClassAndInterface.class: ObjectWithClassAndInterface.class:
KtObjectDeclaration: KtObjectDeclaration:
line: 6 line: 6
@@ -19,14 +96,14 @@ ObjectWithClassAndInterface.class:
KtLightClassForDecompiledDeclaration: NonBaseInterface (two.NonBaseInterface) KtLightClassForDecompiledDeclaration: NonBaseInterface (two.NonBaseInterface)
] ]
BaseInterface.class: AnotherInterface.class:
KtClass: KtClass:
line: 6 line: 6
name: BaseInterface name: AnotherInterface
qualifier: two.BaseInterface qualifier: two.AnotherInterface
light: KtLightClassForDecompiledDeclaration light: KtLightClassForDecompiledDeclaration
name: BaseInterface name: AnotherInterface
qualifier: two.BaseInterface qualifier: two.AnotherInterface
superTypes: [ superTypes: [
PsiType:Object PsiType:Object
] ]
@@ -36,38 +113,24 @@ BaseInterface.class:
ClsClassImpl: Object (java.lang.Object) ClsClassImpl: Object (java.lang.Object)
] ]
NonBaseClass.class: NonBaseInterface.class:
KtClass: KtClass:
line: 6 line: 6
name: NonBaseClass name: NonBaseInterface
qualifier: two.NonBaseClass qualifier: two.NonBaseInterface
light: KtLightClassForDecompiledDeclaration light: KtLightClassForDecompiledDeclaration
name: NonBaseClass name: NonBaseInterface
qualifier: two.NonBaseClass qualifier: two.NonBaseInterface
superTypes: [ superTypes: [
PsiType:BaseClass PsiType:BaseInterface
]
superClass: KtLightClassForDecompiledDeclaration: BaseClass (two.BaseClass)
interfaces: []
supers: [
KtLightClassForDecompiledDeclaration: BaseClass (two.BaseClass)
]
Object.class:
KtObjectDeclaration:
line: 6
name: Object
qualifier: two.Object
light: KtLightClassForDecompiledDeclaration
name: Object
qualifier: two.Object
superTypes: [
PsiType:Object
] ]
superClass: ClsClassImpl: Object (java.lang.Object) superClass: ClsClassImpl: Object (java.lang.Object)
interfaces: [] interfaces: [
KtLightClassForDecompiledDeclaration: BaseInterface (two.BaseInterface)
]
supers: [ supers: [
ClsClassImpl: Object (java.lang.Object) ClsClassImpl: Object (java.lang.Object)
KtLightClassForDecompiledDeclaration: BaseInterface (two.BaseInterface)
] ]
BaseClass.class: BaseClass.class:
@@ -104,27 +167,6 @@ ObjectWithClass.class:
KtLightClassForDecompiledDeclaration: BaseClass (two.BaseClass) KtLightClassForDecompiledDeclaration: BaseClass (two.BaseClass)
] ]
ObjectWithInterface.class:
KtObjectDeclaration:
line: 6
name: ObjectWithInterface
qualifier: two.ObjectWithInterface
light: KtLightClassForDecompiledDeclaration
name: ObjectWithInterface
qualifier: two.ObjectWithInterface
superTypes: [
PsiType:Object
PsiType:BaseInterface
]
superClass: ClsClassImpl: Object (java.lang.Object)
interfaces: [
KtLightClassForDecompiledDeclaration: BaseInterface (two.BaseInterface)
]
supers: [
ClsClassImpl: Object (java.lang.Object)
KtLightClassForDecompiledDeclaration: BaseInterface (two.BaseInterface)
]
ObjectWithClassAndJavaInterface.class: ObjectWithClassAndJavaInterface.class:
KtObjectDeclaration: KtObjectDeclaration:
line: 6 line: 6
@@ -146,35 +188,14 @@ ObjectWithClassAndJavaInterface.class:
ClsClassImpl: Runnable (java.lang.Runnable) ClsClassImpl: Runnable (java.lang.Runnable)
] ]
ObjectsKt.class: BaseInterface.class:
NonBaseInterface.class:
KtClass: KtClass:
line: 6 line: 6
name: NonBaseInterface name: BaseInterface
qualifier: two.NonBaseInterface qualifier: two.BaseInterface
light: KtLightClassForDecompiledDeclaration light: KtLightClassForDecompiledDeclaration
name: NonBaseInterface name: BaseInterface
qualifier: two.NonBaseInterface qualifier: two.BaseInterface
superTypes: [
PsiType:BaseInterface
]
superClass: ClsClassImpl: Object (java.lang.Object)
interfaces: [
KtLightClassForDecompiledDeclaration: BaseInterface (two.BaseInterface)
]
supers: [
ClsClassImpl: Object (java.lang.Object)
KtLightClassForDecompiledDeclaration: BaseInterface (two.BaseInterface)
]
AnotherInterface.class:
KtClass:
line: 6
name: AnotherInterface
qualifier: two.AnotherInterface
light: KtLightClassForDecompiledDeclaration
name: AnotherInterface
qualifier: two.AnotherInterface
superTypes: [ superTypes: [
PsiType:Object PsiType:Object
] ]
@@ -184,24 +205,3 @@ AnotherInterface.class:
ClsClassImpl: Object (java.lang.Object) ClsClassImpl: Object (java.lang.Object)
] ]
ObjectWithNonBaseInterface.class:
KtObjectDeclaration:
line: 6
name: ObjectWithNonBaseInterface
qualifier: two.ObjectWithNonBaseInterface
light: KtLightClassForDecompiledDeclaration
name: ObjectWithNonBaseInterface
qualifier: two.ObjectWithNonBaseInterface
superTypes: [
PsiType:Object
PsiType:NonBaseInterface
]
superClass: ClsClassImpl: Object (java.lang.Object)
interfaces: [
KtLightClassForDecompiledDeclaration: NonBaseInterface (two.NonBaseInterface)
]
supers: [
ClsClassImpl: Object (java.lang.Object)
KtLightClassForDecompiledDeclaration: NonBaseInterface (two.NonBaseInterface)
]
@@ -24,10 +24,6 @@ public abstract class AbstractKotlinClass /* AbstractKotlinClass*/ {
} }
public static final class Companion /* KotlinClass.Companion*/ { public static final class Companion /* KotlinClass.Companion*/ {
@java.lang.Deprecated()
@kotlin.jvm.JvmStatic()
public static void getCompanionLateinitStaticVariable$annotations();// getCompanionLateinitStaticVariable$annotations()
@org.jetbrains.annotations.NotNull() @org.jetbrains.annotations.NotNull()
public final Custom getCompanionLateinitStaticVariable();// getCompanionLateinitStaticVariable() public final Custom getCompanionLateinitStaticVariable();// getCompanionLateinitStaticVariable()
@@ -42,10 +38,6 @@ public static final class Companion /* KotlinClass.Companion*/ {
} }
public static final class Companion /* AbstractKotlinClass.Companion*/ { public static final class Companion /* AbstractKotlinClass.Companion*/ {
@java.lang.Deprecated()
@kotlin.jvm.JvmStatic()
public static void getCompanionLateinitStaticVariable$annotations();// getCompanionLateinitStaticVariable$annotations()
@org.jetbrains.annotations.NotNull() @org.jetbrains.annotations.NotNull()
public final Custom getCompanionLateinitStaticVariable();// getCompanionLateinitStaticVariable() public final Custom getCompanionLateinitStaticVariable();// getCompanionLateinitStaticVariable()
@@ -24,6 +24,10 @@ public abstract class AbstractKotlinClass /* AbstractKotlinClass*/ {
} }
public static final class Companion /* KotlinClass.Companion*/ { public static final class Companion /* KotlinClass.Companion*/ {
@java.lang.Deprecated()
@kotlin.jvm.JvmStatic()
public static void getCompanionLateinitStaticVariable$annotations();// getCompanionLateinitStaticVariable$annotations()
@org.jetbrains.annotations.NotNull() @org.jetbrains.annotations.NotNull()
public final Custom getCompanionLateinitStaticVariable();// getCompanionLateinitStaticVariable() public final Custom getCompanionLateinitStaticVariable();// getCompanionLateinitStaticVariable()
@@ -38,6 +42,10 @@ public static final class Companion /* KotlinClass.Companion*/ {
} }
public static final class Companion /* AbstractKotlinClass.Companion*/ { public static final class Companion /* AbstractKotlinClass.Companion*/ {
@java.lang.Deprecated()
@kotlin.jvm.JvmStatic()
public static void getCompanionLateinitStaticVariable$annotations();// getCompanionLateinitStaticVariable$annotations()
@org.jetbrains.annotations.NotNull() @org.jetbrains.annotations.NotNull()
public final Custom getCompanionLateinitStaticVariable();// getCompanionLateinitStaticVariable() public final Custom getCompanionLateinitStaticVariable();// getCompanionLateinitStaticVariable()
@@ -0,0 +1,90 @@
public abstract class AbstractKotlinClass /* AbstractKotlinClass*/ {
@org.jetbrains.annotations.NotNull()
public static final AbstractKotlinClass.Companion Companion;
public Custom classLateinitVariable;
public static Custom companionLateinitStaticVariable;
public static Custom companionLateinitVariable;
@org.jetbrains.annotations.NotNull()
public final Custom getClassLateinitVariable();// getClassLateinitVariable()
@org.jetbrains.annotations.NotNull()
public static final Custom getCompanionLateinitStaticVariable();// getCompanionLateinitStaticVariable()
public AbstractKotlinClass();// .ctor()
public final void setClassLateinitVariable(@org.jetbrains.annotations.NotNull() Custom);// setClassLateinitVariable(Custom)
public static final void setCompanionLateinitStaticVariable(@org.jetbrains.annotations.NotNull() Custom);// setCompanionLateinitStaticVariable(Custom)
class Companion ...
}
public static final class Companion /* AbstractKotlinClass.Companion*/ {
@org.jetbrains.annotations.NotNull()
public final Custom getCompanionLateinitStaticVariable();// getCompanionLateinitStaticVariable()
@org.jetbrains.annotations.NotNull()
public final Custom getCompanionLateinitVariable();// getCompanionLateinitVariable()
private Companion();// .ctor()
public final void setCompanionLateinitStaticVariable(@org.jetbrains.annotations.NotNull() Custom);// setCompanionLateinitStaticVariable(Custom)
public final void setCompanionLateinitVariable(@org.jetbrains.annotations.NotNull() Custom);// setCompanionLateinitVariable(Custom)
}
public static final class Companion /* KotlinClass.Companion*/ {
@org.jetbrains.annotations.NotNull()
public final Custom getCompanionLateinitStaticVariable();// getCompanionLateinitStaticVariable()
@org.jetbrains.annotations.NotNull()
public final Custom getCompanionLateinitVariable();// getCompanionLateinitVariable()
private Companion();// .ctor()
public final void setCompanionLateinitStaticVariable(@org.jetbrains.annotations.NotNull() Custom);// setCompanionLateinitStaticVariable(Custom)
public final void setCompanionLateinitVariable(@org.jetbrains.annotations.NotNull() Custom);// setCompanionLateinitVariable(Custom)
}
public final class Custom /* Custom*/ {
public Custom();// .ctor()
}
public final class KotlinClass /* KotlinClass*/ {
@org.jetbrains.annotations.NotNull()
public static final KotlinClass.Companion Companion;
public Custom classLateinitVariable;
public static Custom companionLateinitStaticVariable;
public static Custom companionLateinitVariable;
@org.jetbrains.annotations.NotNull()
public final Custom getClassLateinitVariable();// getClassLateinitVariable()
@org.jetbrains.annotations.NotNull()
public static final Custom getCompanionLateinitStaticVariable();// getCompanionLateinitStaticVariable()
public KotlinClass();// .ctor()
public final void setClassLateinitVariable(@org.jetbrains.annotations.NotNull() Custom);// setClassLateinitVariable(Custom)
public static final void setCompanionLateinitStaticVariable(@org.jetbrains.annotations.NotNull() Custom);// setCompanionLateinitStaticVariable(Custom)
class Companion ...
}
public final class LateinitPropertiesKt /* LateinitPropertiesKt*/ {
public static Custom topLevelLateinit;
@org.jetbrains.annotations.NotNull()
public static final Custom getTopLevelLateinit();// getTopLevelLateinit()
public static final void setTopLevelLateinit(@org.jetbrains.annotations.NotNull() Custom);// setTopLevelLateinit(Custom)
}
@@ -1,3 +1,9 @@
public static final class Companion /* State.Companion*/ {
private Companion();// .ctor()
public final boolean done(@org.jetbrains.annotations.NotNull() State);// done(State)
}
public static final class Companion /* Event.Companion*/ { public static final class Companion /* Event.Companion*/ {
@kotlin.jvm.JvmStatic() @kotlin.jvm.JvmStatic()
@org.jetbrains.annotations.Nullable() @org.jetbrains.annotations.Nullable()
@@ -6,12 +12,6 @@ public static final class Companion /* Event.Companion*/ {
private Companion();// .ctor() private Companion();// .ctor()
} }
public static final class Companion /* State.Companion*/ {
private Companion();// .ctor()
public final boolean done(@org.jetbrains.annotations.NotNull() State);// done(State)
}
public enum Event /* Event*/ { public enum Event /* Event*/ {
ON_CREATE, ON_CREATE,
ON_START, ON_START,
@@ -78,6 +78,14 @@ public static final class Companion /* C2.Companion*/ {
private Companion();// .ctor() private Companion();// .ctor()
} }
public static final class Companion /* I.Companion*/ {
private Companion();// .ctor()
}
public static final class Companion /* ClassWithConstContainer.Companion*/ {
private Companion();// .ctor()
}
public static final class Companion /* C.Companion*/ { public static final class Companion /* C.Companion*/ {
@kotlin.jvm.JvmStatic() @kotlin.jvm.JvmStatic()
@org.jetbrains.annotations.NotNull() @org.jetbrains.annotations.NotNull()
@@ -105,14 +113,6 @@ public static final class Companion /* C.Companion*/ {
public final void setX(@org.jetbrains.annotations.NotNull() java.lang.String);// setX(java.lang.String) public final void setX(@org.jetbrains.annotations.NotNull() java.lang.String);// setX(java.lang.String)
} }
public static final class Companion /* I.Companion*/ {
private Companion();// .ctor()
}
public static final class Companion /* ClassWithConstContainer.Companion*/ {
private Companion();// .ctor()
}
public final class ConstContainer /* ConstContainer*/ { public final class ConstContainer /* ConstContainer*/ {
@org.jetbrains.annotations.NotNull() @org.jetbrains.annotations.NotNull()
public static final ConstContainer INSTANCE; public static final ConstContainer INSTANCE;